-
Notifications
You must be signed in to change notification settings - Fork 88
docs: ReactDOMServer #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploy preview for zh-hant-reactjs-org ready! Built with commit ea88de3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is ready for review. Please see my notes.
|
||
If you call [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on a node that already has this server-rendered markup, React will preserve it and only attach event handlers, allowing you to have a very performant first-load experience. | ||
如果你在一個已經有伺服器端 render 標記的 node 上呼叫 [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate),React 將會保留這個 node 並只附上事件處理,這使你能有一個高效能的初次下載體驗。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果你在一個已經有伺服器端 render 標記的 node 上呼叫 [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate),React 將會保留這個 node 並只附上事件處理,這使你能有一個高效能的初次下載體驗。 | |
如果你在一個已經有伺服器端 render markup 的 node 上呼叫 [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate),React 將會保留這個 node 並只附上事件處理,這讓你能有一個高效能的初次載入體驗。 |
|
||
If you plan to use React on the client to make the markup interactive, do not use this method. Instead, use [`renderToString`](#rendertostring) on the server and [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate) on the client. | ||
如果你打算在前端使用 React 以使得標記有互動性的話,請不要使用這個方法。請在伺服器端使用 [`renderToString`](#rendertostring) 並在前端使用 [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果你打算在前端使用 React 以使得標記有互動性的話,請不要使用這個方法。請在伺服器端使用 [`renderToString`](#rendertostring) 並在前端使用 [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)。 | |
如果你打算在前端使用 React 以使得 markup 有互動性的話,請不要使用這個方法。請在伺服器端使用 [`renderToString`](#rendertostring),並在前端使用 [`ReactDOM.hydrate()`](/docs/react-dom.html#hydrate)。 |
Hi @neighborhood999, thanks for your review! I've made all of the requested changes. Please take a look again and we can merge this in. :) |
renderToString()
renderToStaticMarkup()
renderToNodeStream()
renderToStaticNodeStream()