Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should be persisted in the store across session #43

Open
rmanaem opened this issue Feb 17, 2025 · 0 comments
Open

What should be persisted in the store across session #43

rmanaem opened this issue Feb 17, 2025 · 0 comments
Labels
flag:discuss Flag issue that needs to be discussed before it can be implemented.

Comments

@rmanaem
Copy link
Contributor

rmanaem commented Feb 17, 2025

persist(
(set) => ({
currentView: 'landing',
setCurrentView: (view: string) => set({ currentView: view }),
}),
{
name: 'store',
partialize: (state) => ({ currentView: state.currentView }),
storage: createJSONStorage(() => sessionStorage),
}
)

@rmanaem rmanaem added the flag:discuss Flag issue that needs to be discussed before it can be implemented. label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag:discuss Flag issue that needs to be discussed before it can be implemented.
Projects
Status: No status
Development

No branches or pull requests

1 participant