tldraw / tldraw-yjs-example

An example of using tldraw together with yjs.
152 stars 46 forks source link

Editor user preferences are reset when the page is refreshed #17

Open shillo-a opened 6 months ago

shillo-a commented 6 months ago

Hi! Noticed that editor user preferences in local storage are reset when the page is refreshed. It is happened with newer version of tldraw (v2.0.0-beta.4, v2.0.2).

shillo-a commented 6 months ago

I suppose that the problem with this line of code https://github.com/tldraw/tldraw-yjs-example/blob/ed7d759292db8a501afe28c1b9d5be90d0cee349/src/useYjsStore.ts#L137

Why do we need define user id from yClientId? yClientId changes for every connection.