@czaplej/use-ref-constant
v0.11.0
Published
Remember initial value
Downloads
597
Readme
@czaplej/use-ref-constant
Remember the initial value of function
Installation
npm
npm install --save @czaplej/use-ref-constant
yarn
yarn add @czaplej/use-ref-constant
Usage
const App = (props) => {
// always return the initial props
const initialValue = useRefConstant(() => props);
return <>...</>;
};
This library was generated with Nx.