Storage
About the Storage
The Eagle Eye context allows for a user-defined Storage object to be provided for maintaining the integrity of the initial context state at a location of the user's choosing.
This, it accepts, via its Provider's storage
optional prop.
The context defaults to window.sessionstorage
in supporting environments. Otherwise, it defaults to its own internal memory-based storage.
A valid storage object is of the type: IStorage<State>
implementing the following 4 methods:
clone: (data: State) => State; // expects a state clone
getItem: (key: string) => State;
removeItem: (key: string) => void;
setItem: (key: string, data: State) => void;