0.5.0 • Published 4 years ago

simple-react-hooks v0.5.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

simple-react-hooks

React hooks library. Simple, yet powerful custom hooks

Install

npm i simple-react-hooks

Hooks

  • usePrevious — return previous prop or state.
  • useStateWithCallback — return a state and a setter. Callback could be passed and it would be executed after each update.
  • useStateWithCallbackSync — same as useStateWithCallback, but synchronously.
  • useWatch — on each update a console.log or a custom fn would be executed.
  • useForceUpdate — force a component to re-render.
  • useTimeout — start a timeout that will fire a callback, you could stop it or restart.
  • useInterval — start an interval that will fire a callback each time delay finish, it could be restarted or stopped.

Contributing

Feel free to open a PR, or suggest any improvements or new hooks.

Author

Adrián Serrano

Contact

adrserr@hotmail.com

0.4.1

4 years ago

0.1.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago