Hydration Proof

Search documentation

Find a page or section

HP9002: No React found on the page

HP9002 (no-react) means the page loaded without any React renderer, so nothing was hydrated or tested. Check the URL and that the page's scripts load.

HP9002 (no-react) means the page loaded without any React renderer, so nothing was hydrated and nothing on the page was tested. Either the URL does not serve a React page, or its scripts did not load in the test browser. Check the URL and the network requests of the page.

CodeHP9002
Nameno-react
Default severityWarning
GroupTest run problems
What it meansThe page loaded without any React renderer, so nothing was hydrated.

What the HP9002 no React finding means

hydration-proof connects to React through the hook React looks for when it loads. If no renderer has registered two seconds after the page finished loading, it reports:

No React renderer was found on the page.

It is a warning: the page is not broken, but it was not tested either.

On Astro, pages without React islands are normal, and the Astro adapter does not report them.

Likely causes

  • The route serves a page that is not rendered with React: a static file, a page from another app behind the same host, an error page from a proxy.
  • The page's scripts fail to load: a 404 on a JavaScript chunk after a deploy, a Content Security Policy that blocks them, a CDN origin the test machine cannot reach.
  • A redirect to a sign-in page of another service (see HP9010).

How to fix it

Check that the URL serves a React page and that its scripts load in the test browser.

  1. Open the route with --headed and check the network tab for failed scripts.
  2. With --url, make sure the URL points at the app you mean to test.
  3. If the route is not a React page, leave it out with routes.exclude:
hydration-proof.config.ts
import { defineConfig } from "hydration-proof";
 
export default defineConfig({
  routes: {
    exclude: ["/api/**", "/legal/*.html"],
  },
});

Routes explains where routes come from and how to filter them.