import { useMap } from "https://deno.land/x/netzo@0.5.70/deps/usehooks-ts.ts";
Custom hook for managing a key-value map state with setter actions.
Examples
const [map, mapActions] = useMap();
// Access the map
state and use mapActions
to set, remove, or reset entries.
const [map, mapActions] = useMap();
// Access the map
state and use mapActions
to set, remove, or reset entries.
Parameters
optional
initialState: MapOrEntries<K, V>- The initial state of the map as a Map or an array of key-value pairs (optional).