Skip to content

Conversation

@FindAPattern
Copy link
Contributor

@FindAPattern FindAPattern commented Nov 13, 2025

When rendering results in a react application using useLiveIncrementalQuery, every object in the result set changes its reference whenever the underlying result set changes.

For example, consider the following React component:

function Test() {
  const items = useLiveIncrementalQuery('SELECT * FROM test;', [], 'id'); // [{ id: 1 }, { id: 2 }]

  return <>{items.map(x => <TestItem key={x.id} item={x} />)}</>;
}

Without this change, every item will re-render whenever a single item is added to the test table.

Bug Fix

Also included in this PR is a fix for a bug that causes truncated results in incrementalQuery when a transaction overwrites items at the same location.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant