File tree 8 files changed +56
-7
lines changed
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';
21
21
22
22
import * as Scheduler from 'scheduler/unstable_mock' ;
23
23
import { 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' ;
25
29
26
30
import ReactSharedInternals from 'shared/ReactSharedInternals' ;
27
31
import enqueueTask from 'shared/enqueueTask' ;
28
32
const { IsSomeRendererActing} = ReactSharedInternals ;
29
33
30
- // TODO: Publish public entry point that exports the event priority constants
31
- const DefaultEventPriority = 8 ;
32
-
33
34
type Container = {
34
35
rootID : string ,
35
36
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
216
216
217
217
#### ` getCurrentEventPriority `
218
218
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 :
220
220
221
221
``` js
222
222
import {
223
223
DiscreteEventPriority ,
224
224
ContinuousEventPriority ,
225
225
DefaultEventPriority ,
226
- } from ' ./ReactFiberReconciler/src/ReactEventPriorities ' ;
226
+ } from ' react-reconciler/constants ' ;
227
227
228
228
const HostConfig = {
229
229
// ...
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 12
12
" LICENSE" ,
13
13
" README.md" ,
14
14
" build-info.json" ,
15
+ " constants.js" ,
15
16
" index.js" ,
16
17
" reflection.js" ,
17
18
" 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 = [
604
604
externals : [ 'react' ] ,
605
605
} ,
606
606
607
- /******* Reflection *******/
607
+ /******* Reconciler Reflection *******/
608
608
{
609
609
moduleType : RENDERER_UTILS ,
610
610
bundleTypes : [ NODE_DEV , NODE_PROD ] ,
@@ -613,6 +613,15 @@ const bundles = [
613
613
externals : [ ] ,
614
614
} ,
615
615
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
+
616
625
/******* React Is *******/
617
626
{
618
627
bundleTypes : [
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const importSideEffects = Object.freeze({
16
16
'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
17
17
scheduler : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
18
18
'scheduler/tracing' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
19
+ react : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
19
20
'react-dom/server' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
20
21
'react/jsx-dev-runtime' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
21
22
'react-fetch/node' : HAS_NO_SIDE_EFFECTS_ON_IMPORT ,
You can’t perform that action at this time.
0 commit comments