1.1.4 • Published 6 months ago

@monetaur/hooks v1.1.4

Weekly downloads
2
License
ISC
Repository
github
Last release
6 months ago

hooks

A collection of useful React hooks

Build Status semantic-release

Install

npm install @monetaur/hooks

Implement

import React from 'react';
import { useDeepState } from '@monetaur/hooks';

export default function LoginButton() {
  const [{ isLoading, value }, update] = useDeepState({
    isLoading: false,
    value: undefined
  });

  useEffect(() => {
    update('isLoading', true);
  }, [update]);

  return (
    <div>{isLoading ? 'Loading' : 'Not Loading'}</div>
  );
}

Continuous Integration

This package uses GitHub Actions. When a pull request is created, the codebase will automatically be checked for linter errors and test failures.

Releases

This package uses semantic-release. By default, the package expects commits to follow the Angular Commit Message Conventions. That means that commits intended to trigger a new release should look like these:

Logged Non-Release Commits

  • docs: Add documentation for useLocalStorage
  • docs(useLocalStorage): Add documentation for useLocalStorage
  • style: Change indentation from 4 to 2 spaces
  • style(spaces): Change indentation from 4 to 2 spaces
  • refactor: Clean up Webpack config file
  • refactor(webpack config): Clean up Webpack config file
  • perf: Replace react-helmet to resolve memory issues
  • perf(react-helmet): Replace react-helmet to resolve memory issues
  • test: Add tests for Page component
  • test(Page): Add tests for Page component
  • chore: 1.0.0
  • chore(release): 1.0.0

Minor/Feature Release Commits

  • feat: Add useAnotherOne hook for DJ Khaled quotes
  • feat(useAnotherOne): Add useAnotherOne hook for DJ Khaled quotes

Patch Release Commits

  • fix: Resolve equality issue in useDeepState
  • fix(useDeepState): Resolve equality issue in useDeepState

Major/Breaking Release Commits

  • BREAKING CHANGE: Button props have changed to align with ever-changing style guide

Continuous Delivery

When a commit is pushed to the master branch, the following steps will occur: 1. Run linters and tests 2. Run build 3. Read version from package.json 4. Run semantic-release command 5. Read version from package.json 6. If version changed, create a release PR version-bump/{VERSION} with the updated version number 7. Auto approve the release PR after CI processes complete 8. Auto merge the release PR

1.1.4

6 months ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago