Hacker News new | ask | show | jobs
by asleepawake 1549 days ago
how did you manage real time collaboration in sveltekit? are relying completely on firebase?
1 comments

Correct, yes, I subscribe to the Firebase Cloud Firestore events and update a Svelte store whenever something changes. This way I only need to set up the connections once and every Svelte component can just subscribe to updates to the store.

Writing is more challenging, I haven't found a nice solution so I resort to making calls with the Firebase SDK directly (but those updates are then surfaced nicely again through the store).