useSessionStorage

React side-effect hook that manages a single sessionStorage key.

hooks
Description of the SVG image Loading...

Variants

with useHooks

Description of the SVG image Loading...

The useSessionStorage hook allows you to store and retrieve data in the browser’s session storage, providing a way to persist data across multiple page views or browser refreshes. The hook utilizes the window.sessionStorage API to store and retrieve data in the session storage. It automatically synchronizes the stored data with the local state of the component using the hook. Additionally, it listens for changes in the session storage and updates the local state accordingly, ensuring that the component reflects the latest stored values.

Installation

Run the following command:

npx ever-ui-clx@0.2.1 add demo-use-session-storage
# └──> Hook coming soon.

Usage