Repository navigation
Render Next.js client-side tests with use(browser()) - #963
Merged
Merged
Conversation
Collaborator
|
Hi @icyJoseph Thank you for this PR. I brought this up with @timneutkens after this PR: #929 I'm just waiting for him to get back to me and confirm. In what version of NextJS did this become the approved method to do CSR? |
Contributor
Author
|
Hi — yeah we were talking about this. In Next.js the earliest minor release would be |
icyJoseph
marked this pull request as ready for review
November 26, 2026 15:35
Collaborator
|
@icyJoseph, thank you. Let me compare versions before I review and merge this then to check if I have to re-run anything. |
Collaborator
|
All good, we are on |
Collaborator
|
@icyJoseph Can I ask did this whole thing trigger the PR change in your docs? |
AlexanderKaran
approved these changes
Nov 26, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This test measures rendering in the browser. The Next.js routes used
next/dynamicwithssr: false, which does more than skip server rendering. It also splits the component into its own chunk that the browser requests after the page's JavaScript runs, and the component suspends while that loads. React batches reveals of suspended content, so the table then waits for the next batch.React's
use(browser())inside a Suspense boundary renders a component only in the browser, which is what this test asks for. The Next.js docs already describe it, afternext/dynamic. vercel/next.js#102401 updates that section to lead with it. The server HTML still contains no table or detail content, and nothing suspends in the browser.Local runs on Next.js 16.4.6, 5 runs each: First Paint / FCP 346ms → 83ms. Interaction latency is unchanged within noise.
Methodology updated to describe the new setup.
Checklist
starter-*package, ensure that the deps, and file content matches the output of the metaframeworks recommended starter/default project