This commit is contained in:
Sophie Alpert
2018-10-29 12:29:41 -07:00
parent 5045763064
commit 6efbbe0685
+3 -1
View File
@@ -772,7 +772,9 @@ type RootOptions = {
};
function createRoot(container: DOMContainer, options?: RootOptions): ReactRoot {
const functionName = enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot';
const functionName = enableStableConcurrentModeAPIs
? 'createRoot'
: 'unstable_createRoot';
invariant(
isValidContainer(container),
'%s(...): Target container is not a DOM element.',