usehooks
usehooks copied to clipboard
A collection of modern, server-safe React hooks – from the ui.dev team
Previously, `valueToStore` are calculated directly using `storedValue` returned by `useState`. I updated it using callback instead of that. https://reactjs.org/docs/react-component.html#setstate
comopnent -> component
Hey, I was using the useDarkMode hook in typescript and I realized that it's not working probably cause you specify the type of boolean for local storage and the initial...
fix typo
remove some TS leftover from JS code
This code is not very concrete about it's use case, so there is no need for many explicit types, Typescript type inference is fine here.
It's not uncommon to have a `no-any` eslint rule, and here it's unnecessary.
I converted useMemo file code to Typescript, I double checked, it was easy one and you can merged it.