Skip to content
22 linesCodeBlameRaw
1import { StrictMode, startTransition } from "react";
2import { hydrateRoot } from "react-dom/client";
3import { HydratedRouter } from "react-router/dom";
4
5// Product analytics, started before the app (lib/analytics.client.ts).
6import "./lib/analytics.client";
7
8startTransition(() => {
9 hydrateRoot(
10 document,
11 <StrictMode>
12 <HydratedRouter />
13 </StrictMode>,
14 {
15 // React recovers from a page the server rendered differently by
16 // rendering it again here; say where, so it can be fixed.
17 onRecoverableError(error, info) {
18 console.error("g1t: recovered from", error, info.componentStack);
19 },
20 },
21 );
22});