@@ -13,7 +13,6 @@ import ReactReconciler from 'react-reconciler';
1313import {
1414 ConcurrentRoot ,
1515 DefaultEventPriority ,
16- //@ts -ignore (TODO: remove after https://github.com/DefinitelyTyped/DefinitelyTyped/pull/72046 is released)
1716 NoEventPriority ,
1817} from 'react-reconciler/constants.js' ;
1918import { CONTROL , INTERACTION , LAYER , OVERLAY , SOURCE , VIEW } from './config.js' ;
@@ -451,27 +450,42 @@ const reconciler = ReactReconciler({
451450 */
452451const roots = new Map ( ) ;
453452
453+ const logError =
454+ typeof reportError === 'function' ? reportError : console . error ; // eslint-disable-line no-console
455+
454456/**
455457 * @param {React.ReactNode } element The element to render.
456- * @param {any } container The container.
458+ * @param {any } containerInfo The container.
457459 */
458- export function render ( element , container ) {
459- let root = roots . get ( container ) ;
460+ export function render ( element , containerInfo ) {
461+ let root = roots . get ( containerInfo ) ;
460462 if ( ! root ) {
461- const logRecoverableError =
462- typeof reportError === 'function' ? reportError : console . error ; // eslint-disable-line no-console
463+ // naming arguments as they are in rect-reconciler
464+ const tag = ConcurrentRoot ;
465+ const hydrationCallbacks = null ;
466+ const isStrictMode = false ;
467+ const concurrentUpdatesByDefaultOverride = false ;
468+ const identifierPrefix = '' ;
469+ const onUncaughtError = logError ;
470+ const onCaughtError = logError ;
471+ const onRecoverableError = logError ;
472+ const onDefaultTransitionIndicator = function ( ) { } ;
473+ const transitionCallbacks = null ;
463474
464475 root = reconciler . createContainer (
465- container ,
466- ConcurrentRoot ,
467- null ,
468- false ,
469- null ,
470- '' ,
471- logRecoverableError ,
472- null ,
476+ containerInfo ,
477+ tag ,
478+ hydrationCallbacks ,
479+ isStrictMode ,
480+ concurrentUpdatesByDefaultOverride ,
481+ identifierPrefix ,
482+ onUncaughtError ,
483+ onCaughtError ,
484+ onRecoverableError ,
485+ onDefaultTransitionIndicator ,
486+ transitionCallbacks ,
473487 ) ;
474- roots . set ( container , root ) ;
488+ roots . set ( containerInfo , root ) ;
475489 }
476490
477491 reconciler . updateContainer ( element , root , null , null ) ;
0 commit comments