Implement a hook useMap(initialMap) that provides a reactive Map-like object with utility functions.
The hook should:
get, set, delete, has, clear keys.values() or entries() to get all current entries.Example
const map = useMap({ a: 1, b: 2 }); map.set("c", 3); map.get("a"); // 1 map.delete("b"); map.has("b"); // false
JavaScript Function
No test results yet
Click "Run" to execute tests