@revolt-digital/use-state-ref
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Custom hook for react: useStateRef

Install

yarn add @revolt-digital/use-state-ref

How to use it?

import React from 'react';
import useStateRef from '@revolt-digital/use-state-ref';

export default () => {
    const [state, setState, prevState] = useStateRef(0);

    return <div>Hello there!</div>;
};

Readme

Keywords

none

Package Sidebar

Install

npm i @revolt-digital/use-state-ref

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

2.36 kB

Total Files

6

Last publish

Collaborators

  • andresrevolt
  • eapuulesrevolt
  • maitzeth
  • franco-revolt
  • fmrevolt