TanStack / TanStack/db

Add Playwright tests for react-db useLiveQuery

Open
#493 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.9k
Forks
266
Avg merge
1d 4h
Merged PRs (30d)
55

Description

React in the browser does concurrent rendering, this caused a bug in useLiveQuery where it would not show the initial state despite our tests checking this exact scenario. In order to truly validate the hook we need to test in a browser environment.

Relate issues #483 #437 that were fixed in #485 but without a test that reproduced the bug.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the React useLiveQuery entry point and the existing tests covering its initial state, then review the browser-testing setup for Playwright. Reproduce the concurrent-rendering scenario described in the issue and add browser coverage that verifies the initial state is shown; the related issues and fix in #485 provide context.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright, react, typescript
Domain
frontend, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.