Use Memo One
use-memo-one
useMemo and useCallback but with a stable cache
Utilities
memoization
react
useMemo
useCallback
memoize-one
use-memo-one
Utilities
javascript
npm
frontend
Stars
1
Weekly
0
Open issues
0
Bundle
~60 kB
Installation
npm install use-memo-oneCode example
import { useMemoOne } from "use-memo-one";
export function Example() {
const value = useMemoOne();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Alex Reardon
- 0 weekly downloads. Battle tested
- MIT licensed
Considerations
- Adds roughly ~60 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 0 open issues on GitHub