react-hooked

0.1.1 • Public • Published

react-hooked

♻️ Useful custom hooks for react.

Available Hooks

usePrevious

Lets you reference the previous prop or state of a component:

function Counter() {
  const [count, setCount] = useState(0);
  const prevCount = usePrevious(count);
 
  return (
    <h1>
      Now: {count}, before: {prevCount}
    </h1>
  );
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    0
  • 0.1.0
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i react-hooked

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

245 kB

Total Files

9

Last publish

Collaborators

  • vitorbal