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
BREAKING CHANGE: If you have React 18 installed, we'll use the new [`createRoot` API](reactwg/react-18#5) by default which comes with a set of [changes while also enabling support for concurrent features](reactwg/react-18#4).
To can opt-out of this change by using `render(ui, { legacyRoot: true } )`. But be aware that the legacy root API is deprecated in React 18 and its usage will trigger console warnings.
// eslint-disable-next-line jest/no-if -- jest doesn't support conditional tests
111
+
if(isConcurrentReact){
112
+
// eslint-disable-next-line jest/no-conditional-expect -- yes, jest still doesn't support conditional tests
113
+
expect(performConcurrentRender).not.toThrow()
114
+
}else{
115
+
// eslint-disable-next-line jest/no-conditional-expect -- yes, jest still doesn't support conditional tests
116
+
expect(performConcurrentRender).toThrowError(
117
+
`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).`,
118
+
)
119
+
}
120
+
})
121
+
122
+
test('can be called multiple times on the same container',()=>{
0 commit comments