We are building a React app using Sitecore JSS and we want to store some data about the user. The data is either info we want to store while the user is logged in (e.g. cache the user profile retrieved from the database) and other data we want to persist (e.g. their language preference). Should we be storing this data in Sitecore context?
In a normal React/SPA app we'd store this data in local and session storage, but we can't do that in a JSS app since the application crashes in Sitecore integrated mode (e.g. when you try to navigate to Sitecore author, you just get an ASP.NET error page) because browser specific resources (e.g. local and session storage) do not exist when Sitecore does Server Side Rendering.
Thanks in advance!