Skip to content

Commit 00d534e

Browse files
committed
{ hydrate: true } -> hydrateRoot
1 parent f570722 commit 00d534e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pure.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ function createConcurrentRoot(container, options) {
4040
`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).'`,
4141
)
4242
}
43-
const root = ReactDOM.createRoot(container, options)
43+
const root = options.hydrate
44+
? ReactDOM.hydrateRoot(container)
45+
: ReactDOM.createRoot(container)
4446

4547
return {
4648
hydrate(element) {

0 commit comments

Comments
 (0)