@@ -77,9 +77,8 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
7777 didNotMatchHydratedTextInstance,
7878 didNotHydrateContainerInstance,
7979 didNotHydrateInstance,
80- // TODO: These are currently unused, see below.
81- // didNotFindHydratableContainerInstance,
82- // didNotFindHydratableContainerTextInstance,
80+ didNotFindHydratableContainerInstance,
81+ didNotFindHydratableContainerTextInstance,
8382 didNotFindHydratableInstance,
8483 didNotFindHydratableTextInstance,
8584 } = hydration ;
@@ -140,25 +139,25 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
140139 fiber . effectTag |= Placement ;
141140 if ( __DEV__ ) {
142141 switch ( returnFiber . tag ) {
143- // TODO: Currently we don't warn for insertions into the root because
144- // we always insert into the root in the non-hydrating case. We just
145- // delete the existing content. Reenable this once we have a better
146- // strategy for determining if we're hydrating or not.
147- // case HostRoot: {
148- // const parentContainer = returnFiber.stateNode.containerInfo ;
149- // switch (fiber.tag) {
150- // case HostComponent:
151- // const type = fiber.type;
152- // const props = fiber.pendingProps;
153- // didNotFindHydratableContainerInstance(parentContainer, type, props );
154- // break;
155- // case HostText:
156- // const text = fiber.pendingProps;
157- // didNotFindHydratableContainerTextInstance(parentContainer, text);
158- // break;
159- // }
160- // break;
161- // }
142+ case HostRoot : {
143+ const parentContainer = returnFiber . stateNode . containerInfo ;
144+ switch ( fiber . tag ) {
145+ case HostComponent :
146+ const type = fiber . type ;
147+ const props = fiber . pendingProps ;
148+ didNotFindHydratableContainerInstance (
149+ parentContainer ,
150+ type ,
151+ props ,
152+ ) ;
153+ break ;
154+ case HostText :
155+ const text = fiber . pendingProps ;
156+ didNotFindHydratableContainerTextInstance ( parentContainer , text ) ;
157+ break ;
158+ }
159+ break ;
160+ }
162161 case HostComponent : {
163162 const parentType = returnFiber . type ;
164163 const parentProps = returnFiber . memoizedProps ;
0 commit comments