A mutable data structure for hooks to maintain state across their lifecycle. Each hook instance gets its own isolated data store that persists for the duration of a single flag evaluation.
A record type that defines the shape of the stored data
Clears all values from the hook data store.
Deletes a value from the hook data store.
The key to delete
True if the key was deleted, false if it didn't exist
Gets a value from the hook data store.
The key to retrieve the value for
The stored value, or undefined if not found
Checks if a key exists in the hook data store.
The key to check
True if the key exists, false otherwise
Sets a value in the hook data store.
The key to store the value under
The value to store
A mutable data structure for hooks to maintain state across their lifecycle. Each hook instance gets its own isolated data store that persists for the duration of a single flag evaluation.