Skip to content

Commit 797174c

Browse files
committed
doc next steps
1 parent b77746e commit 797174c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

priv/igniter/phx.sync.tanstack_db/assets/js/db/collections.ts.eex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ import { todoSchema } from './schema'
1313
import type { Todo } from './schema'
1414

1515

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+
//
1626
export const todoCollection = createCollection<Todo>(
1727
localOnlyCollectionOptions({
1828
getKey: (todo: Todo) => todo.id,

0 commit comments

Comments
 (0)