New
Introducing React Bench, see how different models perform on React code

react-doctor/no-hydration-branch-on-browser-global

Server and client render different branches

  • Category: Bugs
  • Severity: error
  • Source: oxlint-plugin-react-doctor
  • Framework: global
  • Enabled when: react, ssr
  • Default: Enabled

Validation prompt

Use this to decide whether a fired diagnostic is real or a false positive.

Confirm the reported code matches Server and client render different branches. Check the framework context and diagnostic message before suppressing it.

Fix prompt

Use this once validation confirms the diagnostic is real.

Render the same initial output on the server and client, then switch after mount or use useSyncExternalStore with a stable server snapshot.

More Bugs rules from the rules reference: