@24hr/react-hooks


React hooks library
Documentation
useBeforeMount
A hook that runs before mount and is suitable for SSR.
useBeforeMount(() =>
console.log('Runs only once before component mounts. Works on the server!')
)
useLocalStorage
A hook that syncs state with localstorage
const [state, setState, clear] = useLocalStorage('default value', 'key', { clearOnUnmount: false });
Want to contribute?
It's easy to contribute!
-
Clone the repo and create a new branch from master.
-
Make your changes.
-
Run ./bump.sh and choose if your changes are major, minor och patch.
-
Commit and push.
-
Make a merge request to master. The CI pipeline will publish your new version to NPM!
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!