0.1.9 • Published 8 months ago

@ayonli/react-hooks v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

React Hooks

A group of react hooks that makes life easier.

This package currently include the following hooks, more hooks may be added in the future.

  • useAsyncData Asynchronously load remote data, usually used with {@link fetch} API.
  • useDebouncedCallback Returns a debounced function that can be used to reduce unnecessary calls.
  • usePropState Uses a prop as the state in a component, and when the prop changes, the state will change accordingly.
  • useRerender Returns a rerender function that can be used to trigger a rerender of the component manually.
  • useRevertibleState Adds additional functions to the useState hook, allowing us to undo and redo state changes.
  • useRouter Manipulates route and retrieving route parameters.
  • useSubmit Submit data to a remote server and track the status of the request.
  • useStorageState Similar to useState, but persist the state to the localStorage (by default) or sessionStorage.
  • useUrlState Similar to useState, but persist the state to the URL query parameters.
0.1.9

8 months ago

0.1.8

10 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

12 months ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago