MCPcopy Index your code
hub / github.com/TanStack/db / createUsersCollection

Function createUsersCollection

packages/react-db/tests/useLiveQueryEffect.test.tsx:21–29  ·  view source on GitHub ↗
(initialData = initialUsers)

Source from the content-addressed store, hash-verified

19const flushPromises = () => new Promise((resolve) => setTimeout(resolve, 0))
20
21function createUsersCollection(initialData = initialUsers) {
22 return createCollection(
23 mockSyncCollectionOptions<User>({
24 id: `test-users-hook`,
25 getKey: (user) => user.id,
26 initialData,
27 }),
28 )
29}
30
31describe(`useLiveQueryEffect`, () => {
32 it(`should create effect on mount and dispose on unmount`, async () => {

Callers 1

Calls 2

createCollectionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…