From cbae955d80d05eafe809f7504502e7fea4acf4a5 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 25 Mar 2020 09:22:52 +0000 Subject: [PATCH] Revert "Rename internal fields (#18377)" This reverts commit 2ba43edc2675380a0f2222f351475bf9d750c6a9. --- packages/react-dom/src/client/ReactDOMComponentTree.js | 8 ++++---- packages/shared/ReactInstanceMap.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-dom/src/client/ReactDOMComponentTree.js b/packages/react-dom/src/client/ReactDOMComponentTree.js index b99b3cd540658..a5eae37042800 100644 --- a/packages/react-dom/src/client/ReactDOMComponentTree.js +++ b/packages/react-dom/src/client/ReactDOMComponentTree.js @@ -30,10 +30,10 @@ import {getParentSuspenseInstance} from './ReactDOMHostConfig'; const randomKey = Math.random() .toString(36) .slice(2); -const internalInstanceKey = '__reactFiber$' + randomKey; -const internalEventHandlersKey = '__reactEvents$' + randomKey; -const internalContainerInstanceKey = '__reactContainer$' + randomKey; -const internalEventListenersKey = '__reactListeners$' + randomKey; +const internalInstanceKey = '__reactInternalInstance$' + randomKey; +const internalEventHandlersKey = '__reactEventHandlers$' + randomKey; +const internalContainerInstanceKey = '__reactContainere$' + randomKey; +const internalEventListenersKey = '__reactEventListeners$' + randomKey; export function precacheFiberNode( hostInst: Fiber, diff --git a/packages/shared/ReactInstanceMap.js b/packages/shared/ReactInstanceMap.js index 863d520a1a11d..60ca4a0426efd 100644 --- a/packages/shared/ReactInstanceMap.js +++ b/packages/shared/ReactInstanceMap.js @@ -21,17 +21,17 @@ * supported we can rename it. */ export function remove(key) { - key._reactInternals = undefined; + key._reactInternalFiber = undefined; } export function get(key) { - return key._reactInternals; + return key._reactInternalFiber; } export function has(key) { - return key._reactInternals !== undefined; + return key._reactInternalFiber !== undefined; } export function set(key, value) { - key._reactInternals = value; + key._reactInternalFiber = value; }