react/fixtures/ssr
Sebastian Markbåge 0bdb9206b7
[Fizz] If we haven't painted yet, wait to reveal everything until next paint (#34230)
Before the first rAF, we don't know if there has been other paints
before this and if so when. (We could get from performance observer.) We
can assume that it's not earlier than 0 so we used delay up until the
throttle time starting from zero but if the first paint is about to
happen that can be very soon after.

Instead, this reveals it during the next paint which should let us be
able to get into the first paint. If we can trust `rel="expect"` to have
done its thing we should schedule our raf before first paint but ofc
browsers can cheat and paint earlier if they want to.

If we're wrong, this is at least more batched than doing it
synchronously. However it will mean that things might get more flashy
than it should be if it would've been throttled. An alternative would be
to always throttle first reveal.
2025-08-18 20:22:40 -04:00
..
public SSR fixture (#9547) 2017-04-27 21:03:32 -07:00
server [Fizz] Outline if a boundary would add too many bytes to the next completion (#33029) 2025-04-29 19:13:28 -04:00
src [Fizz] If we haven't painted yet, wait to reveal everything until next paint (#34230) 2025-08-18 20:22:40 -04:00
package.json Don't auto-start browser in SSR fixtures (#32652) 2025-03-17 17:26:00 -04:00
README.md Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
yarn.lock Bump follow-redirects from 1.15.4 to 1.15.6 in /fixtures/ssr (#28571) 2024-03-18 11:59:57 -04:00

SSR Fixtures

A set of test cases for quickly identifying issues with server-side rendering.

Setup

To reference a local build of React, first run npm run build at the root of the React project. Then:

cd fixtures/ssr
yarn
yarn start

The start command runs a webpack dev server and a server-side rendering server in development mode with hot reloading.

Note: whenever you make changes to React and rebuild it, you need to re-run yarn in this folder:

yarn

If you want to try the production mode instead run:

yarn start:prod

This will pre-build all static resources and then start a server-side rendering HTTP server that hosts the React app and service the static resources (without hot reloading).