File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 88import { HostComponent , HostText } from 'shared/ReactWorkTags' ;
99import invariant from 'shared/invariant' ;
1010
11- const randomKey = Math . random ( )
12- . toString ( 36 )
13- . slice ( 2 ) ;
14- const internalInstanceKey = '__reactInternalInstance$' + randomKey ;
15- const internalEventHandlersKey = '__reactEventHandlers$' + randomKey ;
11+ // const randomKey = Math.random()
12+ // .toString(36)
13+ // .slice(2);
14+ const internalInstanceKey = '__reactInternalInstance$' ;
15+ const internalEventHandlersKey = '__reactEventHandlers$' ;
1616
1717export function precacheFiberNode ( hostInst , node ) {
1818 node [ internalInstanceKey ] = hostInst ;
Original file line number Diff line number Diff line change @@ -728,6 +728,9 @@ function commitUnmount(current: Fiber): void {
728728 }
729729 case HostComponent: {
730730 safelyDetachRef ( current ) ;
731+ // HACK: detach fiber references from DOM
732+ current . stateNode . __reactEventHandlers$ = null ;
733+ current . stateNode . __reactInternalInstance$ = null ;
731734 break ;
732735 }
733736 case HostPortal : {
You can’t perform that action at this time.
0 commit comments