You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've removed the beforeunload event. Instead, on unload, the current map gets saved to localStorage.
I think it would be better to save state as the user creates it (every time something is pushed onto the "undo" stack). That way, state will survive even if the browser tab crashes.
(If we do this, I think it would make sense to switch to IndexedDB, which has an async API, to ensure that saving the map doesn't lock the main thread. I recommend idb-keyval.)
The text was updated successfully, but these errors were encountered:
Apropos this comment:
I think it would be better to save state as the user creates it (every time something is pushed onto the "undo" stack). That way, state will survive even if the browser tab crashes.
(If we do this, I think it would make sense to switch to IndexedDB, which has an async API, to ensure that saving the map doesn't lock the main thread. I recommend idb-keyval.)
The text was updated successfully, but these errors were encountered: