Skip to content

Query Collection "Incremental Updates" example never updates with server-sent data. #814

@willhoney7

Description

@willhoney7
  • I've validated the bug against the latest version of DB packages

Describe the bug
Query Collection Example Incremental Updates does not ever update the collection with the new server data. The idea is that the server data is supposed to load in to the collection once the insert is complete but in practice the collection only retains the old, client-only data.

To Reproduce
I've created a codesandbox that illustrates the issue clearly. You can see that the "id" never switches from the client-side negative number to the server-side positive number.

https://codesandbox.io/p/sandbox/tanstack-db-bug-7txp3s?file=%2Fsrc%2FApp.tsx

Expected behavior
I would expect the collection data to correctly update with the server-sent data. (Or, does the documentation need to be changed with this no longer being the correct way to achieve this functionality?)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions