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)
`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)
110
-
111
-
You can continue using `renderToString` if your static site generation environment does not support streams.
0 commit comments