From 420bae9bf0d26e8e70f7e3e1aa757bbdca3af523 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 24 Mar 2020 17:23:29 +0000 Subject: [PATCH] Rename internal fields --- 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 a5eae37042800..b99b3cd540658 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 = '__reactInternalInstance$' + randomKey; -const internalEventHandlersKey = '__reactEventHandlers$' + randomKey; -const internalContainerInstanceKey = '__reactContainere$' + randomKey; -const internalEventListenersKey = '__reactEventListeners$' + randomKey; +const internalInstanceKey = '__reactFiber$' + randomKey; +const internalEventHandlersKey = '__reactEvents$' + randomKey; +const internalContainerInstanceKey = '__reactContainer$' + randomKey; +const internalEventListenersKey = '__reactListeners$' + randomKey; export function precacheFiberNode( hostInst: Fiber, diff --git a/packages/shared/ReactInstanceMap.js b/packages/shared/ReactInstanceMap.js index 60ca4a0426efd..863d520a1a11d 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._reactInternalFiber = undefined; + key._reactInternals = undefined; } export function get(key) { - return key._reactInternalFiber; + return key._reactInternals; } export function has(key) { - return key._reactInternalFiber !== undefined; + return key._reactInternals !== undefined; } export function set(key, value) { - key._reactInternalFiber = value; + key._reactInternals = value; }