Created
January 19, 2022 16:43
-
-
Save GaetanoPiazzolla/51fc7a98b6449dd8b2e98b08f7a3f653 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sessionStorage.setItem('pets', '{"pets":{"fido":{"species":"dog"}}}'); | |
const store = createStore(); | |
const persister = createSessionPersister(store, 'pets'); | |
await persister.load(); | |
console.log(store.getTables()); | |
// -> {pets: {fido: {species: 'dog'}}} | |
sessionStorage.clear(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment