useSessionStorage ​
Hook that manages session storage value
typescript
import { useSessionStorage } from '@elysiumorg/solid-use';Usage ​
typescript
const [value, setValue, removeValue] = useSessionStorage('session-key', { initialValue: 0, });
Demo ​
Api ​
Parameters
| Name | Type | Default | Note | 
|---|---|---|---|
| key | string | - | The key of the storage | 
| options? | UseStorageOptions<Value> | - | The options of the storage |