Skip to content

useMap ​

Category
Utilities

Hook that manages a map structure

typescript
import { useMap } from '@siberiacancode/reactuse';

Usage ​

typescript
const { value, set, remove, clear, reset, size, has } = useMap([1, 'one'], [2, 'two']);

Demo ​

Api ​

Parameters

NameTypeDefaultNote
values?Value[]-The initial array of the map

Contributors ​

Source • Demo