Open History to see the last commit
1// The typical app, plus a collection persisted to localStorage.
2import { createCollection, localStorageCollectionOptions } from '@tanstack/db'
3
4export * from './app.js'
5
6export const drafts = createCollection(
7 localStorageCollectionOptions({
8 storageKey: `drafts`,
9 getKey: (draft) => draft.id,
10 }),
11)