@solariera/use-memoized
v0.0.4
Published
Memoize hook for object
Downloads
2
Maintainers
Readme
useMemoized / React hook
This is npm package template
1. Usage
1-1. Installation
# npm
npm install @solariera/use-memoized
# yarn
yarn add @solariera/use-memoized
1-2. Basic Usage
import { useObjectMemo, useMemoized } from '@solariera/use-memoized';
/** Same use as useMemo */
const frameProps: FrameProps = useObjectMemo(() => frameProps, []);
/** Simple usage when you know object type */
const buttonProps: FrameProps = useMemoized({ ...frameProps, onPress });