@czaplej/use-ref-constant
TypeScript icon, indicating that this package has built-in type declarations

0.11.0 • Public • Published

@czaplej/use-ref-constant

license npm latest package

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.

Readme

Keywords

Package Sidebar

Install

npm i @czaplej/use-ref-constant

Weekly Downloads

114

Version

0.11.0

License

MIT

Unpacked Size

3.69 kB

Total Files

7

Last publish

Collaborators

  • czaplej26