0.11.0 • Published 2 months ago
@czaplej/use-ref-constant v0.11.0
@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.