marilari88 / zod-playground

Play with Zod schema validation
https://zod-playground.vercel.app
MIT License
23 stars 1 forks source link

Add data persistence between sessions #21

Open marilari88 opened 2 months ago

marilari88 commented 2 months ago

Save current session data to localStorage or indexDb. Add a new Dialog/Drawer that let user to retrieved saved data

giacomocerquone commented 2 months ago

This should be easy. If no one is working on this, assign it to me please.

Do you have preference between indexdb and localstorage? The only major difference within the scope of this project would be that the first is asynchronous while localstorage is not but it's simpler to implement.

marilari88 commented 2 months ago

Yes, of course! Maybe I would go with IndexDB for its flexibility. I was thinking in the future if we want to provide the ability to save multiple sessions (with schema, values, and zod versions) IndexedDB would be more suitable. But if you think it is overkill for the current stage and too complex to implement feel free to choose the local storage