@revolt-digital/use-state-ref
v0.0.4
Published
### Install
Downloads
13
Keywords
Readme
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>;
};