File tree Expand file tree Collapse file tree 8 files changed +56
-7
lines changed Expand file tree Collapse file tree 8 files changed +56
-7
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,16 @@ import type {RootTag} from 'react-reconciler/src/ReactRootTags';
2121
2222import * as Scheduler from 'scheduler/unstable_mock' ;
2323import { REACT_FRAGMENT_TYPE , REACT_ELEMENT_TYPE } from 'shared/ReactSymbols' ;
24- import { ConcurrentRoot , LegacyRoot } from 'react-reconciler/src/ReactRootTags' ;
24+ import {
25+ DefaultEventPriority ,
26+ ConcurrentRoot ,
27+ LegacyRoot ,
28+ } from 'react-reconciler/constants' ;
2529
2630import ReactSharedInternals from 'shared/ReactSharedInternals' ;
2731import enqueueTask from 'shared/enqueueTask' ;
2832const { IsSomeRendererActing} = ReactSharedInternals ;
2933
30- // TODO: Publish public entry point that exports the event priority constants
31- const DefaultEventPriority = 8 ;
32-
3334type Container = {
3435 rootID : string ,
3536 children : Array < Instance | TextInstance > ,
Original file line number Diff line number Diff line change @@ -216,14 +216,14 @@ This is a property (not a function) that should be set to `true` if your rendere
216216
217217#### ` getCurrentEventPriority `
218218
219- To implement this method, you'll need some constants available on the _ returned _ ` Renderer ` object :
219+ To implement this method, you'll need some constants available on the special ` react-reconciler/constants ` entry point :
220220
221221``` js
222222import {
223223 DiscreteEventPriority ,
224224 ContinuousEventPriority ,
225225 DefaultEventPriority ,
226- } from ' ./ReactFiberReconciler/src/ReactEventPriorities ' ;
226+ } from ' react-reconciler/constants ' ;
227227
228228const HostConfig = {
229229 // ...
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) Facebook, Inc. and its affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ *
7+ * @flow
8+ */
9+
10+ 'use strict' ;
11+
12+ export * from './src/ReactReconcilerConstants' ;
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ if ( process . env . NODE_ENV === 'production' ) {
4+ module . exports = require ( './cjs/react-reconciler-constants.production.min.js' ) ;
5+ } else {
6+ module . exports = require ( './cjs/react-reconciler-constants.development.js' ) ;
7+ }
Original file line number Diff line number Diff line change 1212 " LICENSE" ,
1313 " README.md" ,
1414 " build-info.json" ,
15+ " constants.js" ,
1516 " index.js" ,
1617 " reflection.js" ,
1718 " cjs/"
Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) Facebook, Inc. and its affiliates.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ *
7+ * @flow
8+ */
9+
10+ // These are semi-public constants exposed to any third-party renderers.
11+ // Only expose the minimal subset necessary to implement a host config.
12+
13+ export {
14+ DiscreteEventPriority ,
15+ ContinuousEventPriority ,
16+ DefaultEventPriority ,
17+ } from './ReactEventPriorities' ;
18+ export { ConcurrentRoot , LegacyRoot } from './ReactRootTags' ;
Original file line number Diff line number Diff line change @@ -604,7 +604,7 @@ const bundles = [
604604 externals : [ 'react' ] ,
605605 } ,
606606
607- /******* Reflection *******/
607+ /******* Reconciler Reflection *******/
608608 {
609609 moduleType : RENDERER_UTILS ,
610610 bundleTypes : [ NODE_DEV , NODE_PROD ] ,
@@ -613,6 +613,15 @@ const bundles = [
613613 externals : [ ] ,
614614 } ,
615615
616+ /******* Reconciler Constants *******/
617+ {
618+ moduleType : RENDERER_UTILS ,
619+ bundleTypes : [ NODE_DEV , NODE_PROD ] ,
620+ entry : 'react-reconciler/constants' ,
621+ global : 'ReactReconcilerConstants' ,
622+ externals : [ ] ,
623+ } ,
624+
616625 /******* React Is *******/
617626 {
618627 bundleTypes : [
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const importSideEffects = Object.freeze({
1616 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
1717 scheduler : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
1818 'scheduler/tracing' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
19+ react : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
1920 'react-dom/server' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
2021 'react/jsx-dev-runtime' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
2122 'react-fetch/node' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
You can’t perform that action at this time.
0 commit comments