Skip to content

Latest commit

 

History

History
677 lines (396 loc) · 27 KB

File metadata and controls

677 lines (396 loc) · 27 KB

@tanstack/react-db

0.2.19

Patch Changes

0.2.18

Patch Changes

  • Add includes (hierarchical data) documentation to all framework SKILL.md files and fix inaccurate toArray scalar select constraint in db-core/live-queries skill. (#1361)

  • Updated dependencies [1e69dd6]:

0.2.17

Patch Changes

0.2.16

Patch Changes

0.2.15

Patch Changes

  • Update all SKILL.md files to v0.6.0 with new documentation for persistence, virtual properties, queryOnce, createEffect, includes, indexing, and sync metadata. Add tanstack-intent keyword to all packages with skills. (#1421)

  • Updated dependencies [8b7fb1a]:

0.2.14

Patch Changes

  • fix(solid-db): support findOne in useLiveQuery (#1403)

    useLiveQuery with .findOne() returned an array instead of a single object. Updated type overloads to use InferResultType<TContext> so findOne queries return T | undefined, and added a runtime singleResult check to return the first element instead of the full array.

    Fixes #1399

  • Update dependencies across workspace to resolve version mismatches: @electric-sql/client ^1.5.13, @tanstack/store ^0.9.2, pg ^8.20.0. Adapt subscription cleanup to @tanstack/store 0.9.x API which returns Subscription objects instead of unsubscribe functions. (#1381)

  • Updated dependencies [f60384b, b8abc02, 09c7afc, bb09eb1, 179d666, 43ecbfa, 055fd94, 055fd94, 055fd94, 055fd94, 85f5435, b65d8f7, e0df07e, 9952921, d351c67]:

0.2.13

Patch Changes

0.2.12

Patch Changes

0.2.11

Patch Changes

  • Add Intent agent skills (SKILL.md files) to guide AI coding agents. Include skills for core DB concepts, all 5 framework bindings, meta-framework integration, and offline transactions. Also add export * from '@tanstack/db' to angular-db for consistency with other framework packages. (#1330)

  • Updated dependencies [bf1d078]:

0.2.10

Patch Changes

0.2.9

Patch Changes

0.2.8

Patch Changes

0.2.7

Patch Changes

0.2.6

Patch Changes

0.2.5

Patch Changes

0.2.4

Patch Changes

0.2.3

Patch Changes

0.2.2

Patch Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

  • Update solid-db to enable suspense support. (#826) You can now run do

    // Use Suspense boundaries
    const todosQuery = useLiveQuery((q) => q.from({ todos: todoCollection }))
    
    return (
      <>
        {/* Status and other getters don't trigger Suspense */}
        <div>Status {todosQuery.status}</div>
        <div>Loading {todosQuery.isLoading ? 'yes' : 'no'}</div>
    
        <Suspense fallback={<div>Loading...</div>}>
          <For each={todosQuery()}>
            {(todo) => <li key={todo.id}>{todo.text}</li>}
          </For>
        </Suspense>
      </>
    )

    All values returned from useLiveQuery are now getters, so no longer need to be called as functions. This is a breaking change. This is to match how createResource works, and everything still stays reactive.

    const todos = useLiveQuery(() => existingCollection)
    
    const handleToggle = (id) => {
      // Can now access collection directly
      todos.collection.update(id, (draft) => {
        draft.completed = !draft.completed
      })
    }
    
    return (
      <>
        {/* Status and other getters don't trigger Suspense */}
        <div>Status {todos.status}</div>
        <div>Loading {todos.isLoading ? 'yes' : 'no'}</div>
        <div>Ready {todos.isReady ? 'yes' : 'no'}</div>
        <div>Idle {todos.isIdle ? 'yes' : 'no'}</div>
        <div>Error {todos.isError ? 'yes' : 'no'}</div>
      </>
    )

Patch Changes

0.1.62

Patch Changes

0.1.61

Patch Changes

0.1.60

Patch Changes

0.1.59

Patch Changes

0.1.58

Patch Changes

0.1.57

Patch Changes

0.1.56

Patch Changes

0.1.55

Patch Changes

0.1.54

Patch Changes

  • Fixed isReady to return true for disabled queries in useLiveQuery/injectLiveQuery across all framework packages. When a query function returns null or undefined (disabling the query), there's no async operation to wait for, so the hook should be considered "ready" immediately. (#886)

    Additionally, all frameworks now have proper TypeScript overloads that explicitly support returning undefined | null from query functions, making the disabled query pattern type-safe.

    This fixes the common pattern where users conditionally enable queries and don't want to show loading states when the query is disabled.

  • Updated dependencies [c4b9399, a1a484e]:

0.1.53

Patch Changes

0.1.52

Patch Changes

0.1.51

Patch Changes

0.1.50

Patch Changes

0.1.49

Patch Changes

0.1.48

Patch Changes

0.1.47

Patch Changes

0.1.46

Patch Changes

0.1.45

Patch Changes

0.1.44

Patch Changes

0.1.43

Patch Changes

0.1.42

Patch Changes

0.1.41

Patch Changes

0.1.40

Patch Changes

0.1.39

Patch Changes

0.1.38

Patch Changes

0.1.37

Patch Changes

0.1.36

Patch Changes

0.1.35

Patch Changes

0.1.34

Patch Changes

0.1.33

Patch Changes

0.1.32

Patch Changes

0.1.31

Patch Changes

0.1.30

Patch Changes

0.1.29

Patch Changes

0.1.28

Patch Changes

0.1.27

Patch Changes

0.1.26

Patch Changes

0.1.25

Patch Changes

0.1.24

Patch Changes

0.1.23

Patch Changes

0.1.22

Patch Changes

  • Let collection.subscribeChanges return a subscription object. Move all data loading code related to optimizations into that subscription object. (#564)

  • Updated dependencies [2f87216, ac6250a, 2f87216]:

0.1.21

Patch Changes

0.1.20

Patch Changes

0.1.19

Patch Changes

0.1.18

Patch Changes

0.1.17

Patch Changes

0.1.16

Patch Changes

0.1.15

Patch Changes

0.1.14

Patch Changes

0.1.13

Patch Changes

0.1.12

Patch Changes

0.1.11

Patch Changes

0.1.10

Patch Changes

0.1.9

Patch Changes

0.1.8

Patch Changes

0.1.7

Patch Changes

0.1.6

Patch Changes

0.1.5

Patch Changes

0.1.4

Patch Changes

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

  • 0.1 release - first beta 🎉 (#332)

Patch Changes

  • We have moved development of the differential dataflow implementation from @electric-sql/d2mini to a new @tanstack/db-ivm package inside the tanstack db monorepo to make development simpler. (#330)

  • Updated dependencies [7d2f4be, f0eda36]:

0.0.29

Patch Changes

0.0.28

Patch Changes

  • Add initial version of solid-db integration TanStack DB with SolidJS (#92)

0.0.27

  • Add support for solid-js