You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -42,10 +42,10 @@ const html = renderToString(<App />);
42
42
43
43
* `reactNode`:你要渲染为 HTML 的 React 节点。例如,一个 JSX 节点,就像 `<App />`。
44
44
45
-
* **optional** `options`: An object for server render.
46
-
* **optional** `identifierPrefix`: A string prefix React uses for IDs generated by [`useId`.](/reference/react/useId) Useful to avoid conflicts when using multiple roots on the same page. Must be the same prefix as passed to [`hydrateRoot`.](/reference/react-dom/client/hydrateRoot#parameters)
45
+
* **可选的** `options`:服务器渲染的对象。
46
+
* **可选的** `identifierPrefix`:React 使用 [`useId`](/reference/react/useId) 生成的 ID 的字符串前缀。用于避免在同一页面使用多个根时发生冲突。必须与传递给 [`hydrateRoot`](/reference/react-dom/client/hydrateRoot#parameters) 的前缀相同。
`renderToString`returns a string immediately, so it does not support waiting for data to load for static HTML generation.
104
+
`renderToString`立即返回一个字符串,它不支持等待静态 HTML 生成的数据加载。
105
105
106
-
We recommend using these fully-featured alternatives:
106
+
我们建议使用这些功能齐全的替代产品:
107
107
108
-
* If you use Node.js, use [`prerenderToNodeStream`.](/reference/react-dom/static/prerenderToNodeStream)
109
-
* If you use Deno or a modern edge runtime with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API), use [`prerender`.](/reference/react-dom/static/prerender)
0 commit comments