File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed
Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 240240- SimenB
241241- SkayuX
242242- smithki
243+ - soartec-lab
243244- sorrycc
244245- souzasmatheus
245246- srmagura
Original file line number Diff line number Diff line change @@ -89,12 +89,29 @@ export const routes: RouteConfig = flatRoutes();
8989
9090### Step 6 - Rename components in entry files
9191
92- If you have an ` entry.server.tsx ` and/or an ` entry.client.tsx ` file in your application, you will need to rename the main components in this files:
92+ If you have an ` entry.server.tsx ` and/or an ` entry.client.tsx ` file in your application, you will need to update the main components in these files:
93+
94+ ``` diff filename=app/entry.server.tsx
95+ - import { RemixServer } from "@remix-run/react";
96+ + import { ServerRouter } from "react-router";
97+
98+ - <RemixServer context={remixContext} url={request.url} />,
99+ + <ServerRouter context={remixContext} url={request.url} />,
100+ ```
101+
102+ ``` diff filename=app/entry.client.tsx
103+ - import { RemixBrowser } from "@remix-run/react";
104+ + import { HydratedRouter } from "react-router/dom";
105+
106+ hydrateRoot(
107+ document,
108+ <StrictMode>
109+ - <RemixBrowser />
110+ + <HydratedRouter />
111+ </StrictMode>,
112+ );
113+ ```
93114
94- | Entry File | Remix v2 Component | | React Router v7 Component |
95- | ------------------ | ------------------ | --- | ------------------------- |
96- | ` entry.server.tsx ` | ` <RemixServer> ` | ➡️ | ` <ServerRouter> ` |
97- | ` entry.client.stx ` | ` <RemixBrowser> ` | ➡️ | ` <HydratedRouter> ` |
98115
99116### Step 7 - Update types for ` AppLoadContext `
100117
You can’t perform that action at this time.
0 commit comments