Skip to content

useLiveQuery returning stale results when querying local storage collection #471

Closed

Description

@craigsmitham

Changes to a local storage collection are successfully being persisted to local storage and useLiveQuery will return the updated data, but then revert back to the pre-modified data. Refreshing the window/tab then reflects the expected updated state. If I switch to a local only collection the issue no longer occurs. This doesn't happen everywhere I'm using useLiveQuery with the same local storage collection, so there is something unique about the way I'm using it combined with local storage. I'm not sure if I'll be able to make a repro case but curious if there is any idea of what might be going on ...

Activity

  1. samwillis commented on Oct 4, 2025

    @samwillis
    Collaborator

    Hey @craigsmitham, thanks for the report. I've tried to reproduce it but not be able to so far. Could you check if you can still trigger it and is so show me the code that does? A reproduction would be ideal.

  2. sudoskys commented on Oct 16, 2025

    @sudoskys

    Are you using electricSQL?

    If so, I think it might be something like this?

    #282

    Changes are "loaded" from the HTTP cache

  3. KyleAMathews commented on Sep 23, 2026

    @KyleAMathews
    Collaborator

    Closing as stale because maintainers could not reproduce this and no reproduction or requested code followed in nearly a year. Please reopen or file a fresh issue with current versions and a minimal reproduction if the stale-result behavior remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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