
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
@24hr/react-hooks
Advanced tools
React hooks library
A hook that runs before mount and is suitable for SSR.
useBeforeMount(() =>
console.log('Runs only once before component mounts. Works on the server!')
)
A hook that syncs state with localstorage
/**
* @typedef Options
* @property {boolean} [clearOnUnmount] - Whether or not to clear the localstorage value on unmount.
*/
/**
* A hook that syncs the state with a property in the localstorage.
* @param {string} defaultVal - The initial value
* @param {string} key - Mandatory key to use to store the data in localstorage.
* @param {Options} options - Options object
* @return {[any, function, function]} - Return the current state, a set state function and a function to clear the storage.
*/
const [state, setState, clear] = useLocalStorage('default value', 'key', { clearOnUnmount: false });
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!
Thanks goes to these wonderful people (emoji key):
Marcus Thelin 💻 | schmolie 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
react hooks
The npm package @24hr/react-hooks receives a total of 43 weekly downloads. As such, @24hr/react-hooks popularity was classified as not popular.
We found that @24hr/react-hooks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.