3 ms·
Svelte-fire* allows you to basically sync state between frontend use (with optional chaining operators) and your firebase/firestore backend. You can basically
by authorfly 2y ago
Svelte-fire* allows you to basically sync state between frontend use (with optional chaining operators) and your firebase/firestore backend. You can basically call stuff as a variable and it gets it from the database and likewise updates it.
Specifically, once I load something (say a document), if I edit in on another tab, it will re-render on my original tab so long as the document it references (by key) is the same and firebase permissions allow me to read it as that firebase user.
It means all my permissions and schema goes in firebase/firebase rules (e.g. users can only access their own documents of type "Car" but can read all documents of type "Road"). Which is quite handy to do stuff quickly that syncs across users and works as a single source of truth.
It's an add on that works with Svelte (and Firebase). *(sorry, I got the wrong phrase)