Skip to content

Commit

Permalink
Move root tags to /constants
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Mar 24, 2021
1 parent 480b96e commit cb2c3ca
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/react-noop-renderer/src/createReactNoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ import type {RootTag} from 'react-reconciler/src/ReactRootTags';

import * as Scheduler from 'scheduler/unstable_mock';
import {REACT_FRAGMENT_TYPE, REACT_ELEMENT_TYPE} from 'shared/ReactSymbols';
import {ConcurrentRoot, LegacyRoot} from 'react-reconciler/src/ReactRootTags';
import {DefaultEventPriority} from 'react-reconciler/constants';
import {
DefaultEventPriority,
ConcurrentRoot,
LegacyRoot,
} from 'react-reconciler/constants';

import ReactSharedInternals from 'shared/ReactSharedInternals';
import enqueueTask from 'shared/enqueueTask';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

'use strict';

export * from './src/ReactEventPriorities';
export * from './src/ReactReconcilerConstants';
18 changes: 18 additions & 0 deletions packages/react-reconciler/src/ReactReconcilerConstants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

// These are semi-public constants exposed to any third-party renderers.
// Only expose the minimal subset necessary to implement a host config.

export {
DiscreteEventPriority,
ContinuousEventPriority,
DefaultEventPriority,
} from './ReactEventPriorities';
export {ConcurrentRoot, LegacyRoot} from './ReactRootTags';
1 change: 1 addition & 0 deletions scripts/rollup/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const importSideEffects = Object.freeze({
'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
scheduler: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'scheduler/tracing': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
react: HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react-dom/server': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react/jsx-dev-runtime': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
'react-fetch/node': HAS_NO_SIDE_EFFECTS_ON_IMPORT,
Expand Down

0 comments on commit cb2c3ca

Please sign in to comment.