Initiliaze & using sessionStorage in React?
SessionStorage is not available when using server side rendering (you can mock it but data won't be available to user).
It's available only in browser https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
Example of writing to storage
window.sessionStorage.setItem("key", "value");
To retrieve item from storage use
window.sessionStorage.getItem("key");