Skip to content

useMap ​

utilities
test coverage
Last changed: last month

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

Source ​

Source • Demo

Contributors ​

Avatardebabin
Avatarhywax

Released under the MIT License.