Skip to content

Commit

Permalink
{ hydrate: true } -> hydrateRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 16, 2021
1 parent f570722 commit 00d534e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pure.js
Expand Up @@ -40,7 +40,9 @@ function createConcurrentRoot(container, options) {
`Attempted to use concurrent React with \`react-dom@${ReactDOM.version}\`. Be sure to use the \`next\` or \`experimental\` release channel (https://reactjs.org/docs/release-channels.html).'`,
)
}
const root = ReactDOM.createRoot(container, options)
const root = options.hydrate
? ReactDOM.hydrateRoot(container)
: ReactDOM.createRoot(container)

return {
hydrate(element) {
Expand Down

0 comments on commit 00d534e

Please sign in to comment.