https://github.com/ludvigalden/use-cleared-memo
React hook for clearing memoized values on unmount and when deps change.
https://github.com/ludvigalden/use-cleared-memo
clearing hooks hydration memoization react
Last synced: 3 months ago
JSON representation
React hook for clearing memoized values on unmount and when deps change.
- Host: GitHub
- URL: https://github.com/ludvigalden/use-cleared-memo
- Owner: ludvigalden
- License: mit
- Created: 2020-05-03T12:01:13.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-06-04T10:12:15.000Z (almost 3 years ago)
- Last Synced: 2025-02-11T09:40:13.189Z (3 months ago)
- Topics: clearing, hooks, hydration, memoization, react
- Language: JavaScript
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.hbs.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/funding.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://npm.im/use-cleared-memo)
[](https://npm.im/use-cleared-memo)
[](https://npm.im/use-cleared-memo)
[](https://npm.im/use-cleared-memo)
[](https://npm.im/use-cleared-memo)
[](./LICENSE)---
Are you building a hook or functional React component that needs to predictably clear and/or hydrate memoized values in an easy-to-use way? Opportunities are almost endless; no matter if you're subscribing to external state, initializing timers or intervals, or creating a new instance of some object every time deps change that eventually needs to be deconstructed, `useClearedMemo` will be there for you to do the job.
{{>main}}
## Authors
- Ludvig Aldén [@ludvigalden](https://github.com/ludvigalden)
---
[MIT License.](https://github.com/ludvigalden/use-cleared-memo/blob/main/LICENSE)