Discussion Javascript React.js

React-use

React-use is the package that provides many useful react hooks that we can use to build the UI more efficiently. It provides the hooks related sensors, ui, animations, side-effects, lifecycles, state and etc.

Sensors

UI

Animations

  • useRaf — re-renders component on each requestAnimationFrame.
  • useInterval and useHarmonicIntervalFn — re-renders component on a set interval using setInterval.
  • useSpring — interpolates number over time according to spring dynamics.
  • useTimeout — re-renders component after a timeout.
  • useTimeoutFn — calls given function after a timeout. 
  • useTween — re-renders component, while tweening a number from 0 to 1. 
  • useUpdate — returns a callback, which re-renders component when called.

Side-effects

Lifecycles

State

Miscellaneous

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *