Skip to content

RR7 requires HydrateFallback and clientLoader to disable SSR #12893

@flodaniel

Description

@flodaniel

I'm using React Router as a...

framework

Reproduction

Had to provide my own repo as stackblitz does not support node 20 which is required for RR7: https://github.com/flodaniel/rr7-ssr-bug

  1. Attempt to disable SSR by exporting a HydrateFallback
  2. Observe the crash window is not defined
  3. Adding an empty clientLoader export resolves the issue: This should not be necessary.

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: ^5.1.0 => 5.4.14

Used Package Manager

npm

Expected Behavior

SSR is disabled as soon as a HydrateFallback is exported

Actual Behavior

SSR is disabled only after a HydrateFallback AND a clientLoader is exported

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions