本页还没有译文
本页 9 段还没译成日本語,下面显示的是英文原文。entry.client.tsx
还没翻译译自英文(reactrouter.com)本页 9 段都还没译
entry.client.tsx
Framework
Summary
Info
This file is optional
This file is the entry point for the browser and is responsible for hydrating the markup generated by the server in your server entry module
This is the first piece of code that runs in the browser. You can initialize any other client-side code here, such as client side libraries, add client only providers, etc.
app/entry.client.tsx
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";
import { HydratedRouter } from "react-router/dom";
startTransition(() => {
hydrateRoot(
document,
<StrictMode>
<HydratedRouter />
</StrictMode>
);
});Generating entry.client.tsx
By default, React Router will handle hydrating your app on the client for you. You can reveal the default entry client file with the following:
npx react-router revealAI 翻译查看英文原文