canvasxyz/canvas

core: Reuse peer IDs

Closed this issue · 1 comments

We should try to reuse peer IDs when a Canvas app is reinitialized locally. This happens often during auto-reloading, or when an app is instantiated by a useCanvas hook inside a component that gets reloaded.

We can achieve this by using sessionStorage instead of localStorage and we can also add a config option to disable short-term persistence of peer IDs.

Closing (makes resetting apps harder)