useHash ​
Hook that manages the hash value
browser
test coverage
Last changed: 5 days ago
Installation ​
Library
CLI
Manual
typescript
import { useHash } from '@siberiacancode/reactuse';
Usage ​
typescript
const [hash, setHash] = useHash("initial");
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
initialValue? | string | - | The initial hash value if no hash exists |
Returns
UseHashReturn
Type declaration ​
typescript
type UseHashReturn = [string, (value: string) => void];
Source ​
Source • DemoContributors ​
D
H