Skip to content

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

NameTypeDefaultNote
initialValue?string-The initial hash value if no hash exists

Returns

UseHashReturn

Type declaration ​

typescript
type UseHashReturn = [string, (value: string) => void];

Source ​

Source • Demo

Contributors ​

D
debabin
debabin
H
hywax
hywax

Released under the MIT License.