useConst ​
Hook that returns the constant value
utilities
test coverage
Last changed: last month
Installation ​
Library
CLI
Manual
typescript
import { useConst } from '@siberiacancode/reactuse';
Usage ​
typescript
const value = useConst('value');
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
initialValue | (() => Value) | Value | - | The initial value of the constant |
Returns
Value
Source ​
Source • DemoContributors ​
D