There was an error while loading. Please reload this page.
1 parent b77746e commit 797174cCopy full SHA for 797174c
1 file changed
priv/igniter/phx.sync.tanstack_db/assets/js/db/collections.ts.eex
@@ -13,6 +13,16 @@ import { todoSchema } from './schema'
13
import type { Todo } from './schema'
14
15
16
+// This is a local-only collection that is not synced to the server and
17
+// immediately applies updates:
18
+//
19
+// https://tanstack.com/db/latest/docs/reference/functions/localonlycollectionoptions
20
21
+// To sync your front-end with your database via Electric you should use
22
+// an `electricCollection` as documented here:
23
24
+// https://tanstack.com/db/latest/docs/collections/electric-collection
25
26
export const todoCollection = createCollection<Todo>(
27
localOnlyCollectionOptions({
28
getKey: (todo: Todo) => todo.id,
0 commit comments