useMap
Provides a reactive Map instance with common mutation methods for state management.
useMap
Installation
Usage
API
useMap
Provides a reactive Map instance with common mutation methods for state management.
Parameters
| Name | Type | Description |
|---|---|---|
| initialEntries | Iterable<[K, V]> | [] | () => Iterable<[K, V]> | Optional initial map entries (optional) |
| initialEntries.0 | K | Map key to initialize |
| initialEntries.1 | V | Map value to initialize |
| initialEntries.get | () => Iterable<[K, V]> | Initializes/replaces the entire map contents |
Returns
| Name | Type | Description |
|---|---|---|
| map | K | |
| set | void | |
| delete | void | |
| clear | void | |
| initialize | void |