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
Copy file name to clipboardExpand all lines: src/pure.js
+19-8
Original file line number
Diff line number
Diff line change
@@ -60,25 +60,36 @@ const mountedContainers = new Set()
60
60
*/
61
61
constmountedRootEntries=[]
62
62
63
-
functioncreateConcurrentRoot(container,options){
63
+
functioncreateConcurrentRoot(
64
+
container,
65
+
{hydrate, ui,wrapper: WrapperComponent},
66
+
){
64
67
if(typeofReactDOM.createRoot!=='function'){
65
68
thrownewTypeError(
66
69
`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).'`,
'Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.',
79
90
)
80
91
}
81
-
root.render(element)
92
+
// Nothing to do since hydration happens when creating the root object.
82
93
},
83
94
render(element){
84
95
root.render(element)
@@ -183,7 +194,7 @@ function render(
183
194
// eslint-disable-next-line no-negated-condition -- we want to map the evolution of this over time. The root is created first. Only later is it re-used so we don't want to read the case that happens later first.
0 commit comments