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