react-hooked
v0.1.1
Published
Useful React custom hooks
Downloads
8
Readme
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>
);
}