Rename SECRET INTERNALS to `__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE` (#28789)
Follow up to #28783 and #28786. Since we've changed the implementations of these we can rename them to something a bit more descriptive while we're at it, since anyone depending on them will need to upgrade their code anyway. "react" with no condition: `__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE` "react" with "react-server" condition: `__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE` "react-dom": `__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`
Sebastian Markbåge committed
Apr 9, 2024 at 12:20 UTC
f6131653570bbbf62d642ba9343b9cd0ab1ae97c
54 files changed
+607
-448
fixtures/dom/public/act-dom.html
+1
-1
@@ -10,7 +10,7 @@
10
<script src="scheduler-unstable_mock.development.js"></script>
11
<script src="react.development.js"></script>
12
<script type="text/javascript">
13
- window.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler =
13
+ window.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler =
14
window.SchedulerMock;
15
</script>
16
<script src="react-dom.development.js"></script>
packages/react-cache/src/ReactCacheOld.js
+1
-1
@@ -45,7 +45,7 @@ const Resolved = 1;
45
const Rejected = 2;
46
47
const SharedInternals =
48
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
49
50
function readContext(Context: ReactContext<mixed>) {
51
const dispatcher = SharedInternals.H;
packages/react-devtools-shared/src/__tests__/legacy/editing-test.js
+14
-9
@@ -64,11 +64,11 @@ describe('editing interface', () => {
64
65
act(() =>
66
ReactDOM.render(
67
- <ClassComponent
68
- array={[1, 2, 3]}
69
- object={{nested: 'initial'}}
70
- shallow="initial"
71
- />,
67
+ React.createElement(ClassComponent, {
68
+ array: [1, 2, 3],
69
+ object: {nested: 'initial'},
70
+ shallow: 'initial',
71
+ }),
72
document.createElement('div'),
73
),
74
);
@@ -270,7 +270,10 @@ describe('editing interface', () => {
270
271
act(() =>
272
ReactDOM.render(
273
- <ClassComponent object={{nested: 'initial'}} shallow="initial" />,
273
+ React.createElement(ClassComponent, {
274
+ object: {nested: 'initial'},
275
+ shallow: 'initial',
276
+ }),
277
document.createElement('div'),
278
),
279
);
@@ -489,9 +492,11 @@ describe('editing interface', () => {
492
493
act(() =>
494
ReactDOM.render(
492
- <LegacyContextProvider>
493
- <ClassComponent />
494
- </LegacyContextProvider>,
495
+ React.createElement(
496
+ LegacyContextProvider,
497
+ null,
498
+ React.createElement(ClassComponent),
499
+ ),
500
document.createElement('div'),
501
),
502
);
packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js
+64
-58
@@ -62,7 +62,10 @@ describe('InspectedElementContext', () => {
62
const Example = () => null;
63
64
act(() =>
65
- ReactDOM.render(<Example a={1} b="abc" />, document.createElement('div')),
65
+ ReactDOM.render(
66
+ React.createElement(Example, {a: 1, b: 'abc'}),
67
+ document.createElement('div'),
68
+ ),
69
);
70
71
const id = ((store.getElementIDAtIndex(0): any): number);
@@ -91,19 +94,19 @@ describe('InspectedElementContext', () => {
94
95
act(() =>
96
ReactDOM.render(
94
- <Example
95
- boolean_false={false}
96
- boolean_true={true}
97
- infinity={Infinity}
98
- integer_zero={0}
99
- integer_one={1}
100
- float={1.23}
101
- string="abc"
102
- string_empty=""
103
- nan={NaN}
104
- value_null={null}
105
- value_undefined={undefined}
106
- />,
97
+ React.createElement(Example, {
98
+ boolean_false: false,
99
+ boolean_true: true,
100
+ infinity: Infinity,
101
+ integer_zero: 0,
102
+ integer_one: 1,
103
+ float: 1.23,
104
+ string: 'abc',
105
+ string_empty: '',
106
+ nan: NaN,
107
+ value_null: null,
108
+ value_undefined: undefined,
109
+ }),
110
document.createElement('div'),
111
),
112
);
@@ -178,28 +181,28 @@ describe('InspectedElementContext', () => {
181
182
act(() =>
183
ReactDOM.render(
181
- <Example
182
- anonymous_fn={instance.anonymousFunction}
183
- array_buffer={arrayBuffer}
184
- array_of_arrays={arrayOfArrays}
184
+ React.createElement(Example, {
185
+ anonymous_fn: instance.anonymousFunction,
186
+ array_buffer: arrayBuffer,
187
+ array_of_arrays: arrayOfArrays,
188
// eslint-disable-next-line no-undef
186
- big_int={BigInt(123)}
187
- bound_fn={exampleFunction.bind(this)}
188
- data_view={dataView}
189
- date={new Date(123)}
190
- fn={exampleFunction}
191
- html_element={div}
192
- immutable={immutableMap}
193
- map={mapShallow}
194
- map_of_maps={mapOfMaps}
195
- object_of_objects={objectOfObjects}
196
- react_element={<span />}
197
- regexp={/abc/giu}
198
- set={setShallow}
199
- set_of_sets={setOfSets}
200
- symbol={Symbol('symbol')}
201
- typed_array={typedArray}
202
- />,
189
+ big_int: BigInt(123),
190
+ bound_fn: exampleFunction.bind(this),
191
+ data_view: dataView,
192
+ date: new Date(123),
193
+ fn: exampleFunction,
194
+ html_element: div,
195
+ immutable: immutableMap,
196
+ map: mapShallow,
197
+ map_of_maps: mapOfMaps,
198
+ object_of_objects: objectOfObjects,
199
+ react_element: React.createElement('span'),
200
+ regexp: /abc/giu,
201
+ set: setShallow,
202
+ set_of_sets: setOfSets,
203
+ symbol: Symbol('symbol'),
204
+ typed_array: typedArray,
205
+ }),
206
document.createElement('div'),
207
),
208
);
@@ -333,7 +336,7 @@ describe('InspectedElementContext', () => {
336
337
act(() =>
338
ReactDOM.render(
336
- <Example object={object} />,
339
+ React.createElement(Example, {object}),
340
document.createElement('div'),
341
),
342
);
@@ -363,7 +366,7 @@ describe('InspectedElementContext', () => {
366
367
act(() =>
368
ReactDOM.render(
366
- <Example object={object} />,
369
+ React.createElement(Example, {object}),
370
document.createElement('div'),
371
),
372
);
@@ -390,7 +393,7 @@ describe('InspectedElementContext', () => {
393
394
act(() =>
395
ReactDOM.render(
393
- <Example iteratable={iteratable} />,
396
+ React.createElement(Example, {iteratable}),
397
document.createElement('div'),
398
),
399
);
@@ -445,7 +448,7 @@ describe('InspectedElementContext', () => {
448
449
act(() =>
450
ReactDOM.render(
448
- <Example data={new CustomData()} />,
451
+ React.createElement(Example, {data: new CustomData()}),
452
document.createElement('div'),
453
),
454
);
@@ -537,7 +540,10 @@ describe('InspectedElementContext', () => {
540
});
541
542
act(() =>
540
- ReactDOM.render(<Example data={object} />, document.createElement('div')),
543
+ ReactDOM.render(
544
+ React.createElement(Example, {data: object}),
545
+ document.createElement('div'),
546
+ ),
547
);
548
549
const id = ((store.getElementIDAtIndex(0): any): number);
@@ -605,7 +611,7 @@ describe('InspectedElementContext', () => {
611
const Example = ({data}) => null;
612
act(() =>
613
ReactDOM.render(
608
- <Example data={testData} />,
614
+ React.createElement(Example, {data: testData}),
615
document.createElement('div'),
616
),
617
);
@@ -631,8 +637,8 @@ describe('InspectedElementContext', () => {
637
638
act(() =>
639
ReactDOM.render(
634
- <Example
635
- nestedObject={{
640
+ React.createElement(Example, {
641
+ nestedObject: {
642
a: {
643
b: {
644
c: [
@@ -644,8 +650,8 @@ describe('InspectedElementContext', () => {
650
],
651
},
652
},
647
- }}
648
- />,
653
+ },
654
+ }),
655
document.createElement('div'),
656
),
657
);
@@ -746,7 +752,7 @@ describe('InspectedElementContext', () => {
752
753
act(() =>
754
ReactDOM.render(
749
- <Example nestedObject={nestedObject} />,
755
+ React.createElement(Example, {nestedObject}),
756
document.createElement('div'),
757
),
758
);
@@ -802,7 +808,7 @@ describe('InspectedElementContext', () => {
808
809
act(() =>
810
ReactDOM.render(
805
- <Example nestedObject={nestedObject} />,
811
+ React.createElement(Example, {nestedObject}),
812
document.createElement('div'),
813
),
814
);
@@ -872,17 +878,17 @@ describe('InspectedElementContext', () => {
878
879
act(() =>
880
ReactDOM.render(
875
- <Example
876
- arrayBuffer={arrayBuffer}
877
- dataView={dataView}
878
- map={map}
879
- set={set}
880
- mapOfMaps={mapOfMaps}
881
- setOfSets={setOfSets}
882
- typedArray={typedArray}
883
- immutable={immutable}
884
- bigInt={bigInt}
885
- />,
881
+ React.createElement(Example, {
882
+ arrayBuffer: arrayBuffer,
883
+ dataView: dataView,
884
+ map: map,
885
+ set: set,
886
+ mapOfMaps: mapOfMaps,
887
+ setOfSets: setOfSets,
888
+ typedArray: typedArray,
889
+ immutable: immutable,
890
+ bigInt: bigInt,
891
+ }),
892
document.createElement('div'),
893
),
894
);
packages/react-devtools-shared/src/__tests__/legacy/storeLegacy-v15-test.js
+385
-266
@@ -11,13 +11,10 @@ describe('Store (legacy)', () => {
11
let React;
12
let ReactDOM;
13
let store;
14
-
14
const act = (callback: Function) => {
15
callback();
17
-
16
jest.runAllTimers(); // Flush Bridge operations
17
};
20
-
18
beforeEach(() => {
19
store = global.store;
20
@@ -27,56 +24,66 @@ describe('Store (legacy)', () => {
24
jest.mock('react-dom', () =>
25
jest.requireActual('react-dom-15/dist/react-dom.js'),
26
);
30
-
27
React = require('react');
28
ReactDOM = require('react-dom');
29
});
34
-
30
it('should not allow a root node to be collapsed', () => {
36
- const Component = () => <div>Hi</div>;
37
-
31
+ const Component = () => React.createElement('div', null, 'Hi');
32
act(() =>
39
- ReactDOM.render(<Component count={4} />, document.createElement('div')),
33
+ ReactDOM.render(
34
+ React.createElement(Component, {
35
+ count: 4,
36
+ }),
37
+ document.createElement('div'),
38
+ ),
39
);
40
expect(store).toMatchInlineSnapshot(`
41
[root]
42
▾ <Component>
43
<div>
44
`);
46
-
45
expect(store.roots).toHaveLength(1);
48
-
46
const rootID = store.roots[0];
50
-
47
expect(() => store.toggleIsCollapsed(rootID, true)).toThrow(
48
'Root nodes cannot be collapsed',
49
);
50
});
55
-
51
describe('collapseNodesByDefault:false', () => {
52
beforeEach(() => {
53
store.collapseNodesByDefault = false;
54
});
60
-
55
it('should support mount and update operations', () => {
62
- const Grandparent = ({count}) => (
63
- <div>
64
- <Parent count={count} />
65
- <Parent count={count} />
66
- </div>
67
- );
68
- const Parent = ({count}) => (
69
- <div>
70
- {new Array(count).fill(true).map((_, index) => (
71
- <Child key={index} />
72
- ))}
73
- </div>
74
- );
75
- const Child = () => <div>Hi!</div>;
76
-
56
+ const Grandparent = ({count}) =>
57
+ React.createElement(
58
+ 'div',
59
+ null,
60
+ React.createElement(Parent, {
61
+ count: count,
62
+ }),
63
+ React.createElement(Parent, {
64
+ count: count,
65
+ }),
66
+ );
67
+ const Parent = ({count}) =>
68
+ React.createElement(
69
+ 'div',
70
+ null,
71
+ new Array(count).fill(true).map((_, index) =>
72
+ React.createElement(Child, {
73
+ key: index,
74
+ }),
75
+ ),
76
+ );
77
+ const Child = () => React.createElement('div', null, 'Hi!');
78
const container = document.createElement('div');
78
-
79
- act(() => ReactDOM.render(<Grandparent count={4} />, container));
79
+ act(() =>
80
+ ReactDOM.render(
81
+ React.createElement(Grandparent, {
82
+ count: 4,
83
+ }),
84
+ container,
85
+ ),
86
+ );
87
expect(store).toMatchInlineSnapshot(`
88
[root]
89
▾ <Grandparent>
@@ -102,8 +109,14 @@ describe('Store (legacy)', () => {
109
▾ <Child key="3">
110
<div>
111
`);
105
-
106
- act(() => ReactDOM.render(<Grandparent count={2} />, container));
112
+ act(() =>
113
+ ReactDOM.render(
114
+ React.createElement(Grandparent, {
115
+ count: 2,
116
+ }),
117
+ container,
118
+ ),
119
+ );
120
expect(store).toMatchInlineSnapshot(`
121
[root]
122
▾ <Grandparent>
@@ -121,27 +134,38 @@ describe('Store (legacy)', () => {
134
▾ <Child key="1">
135
<div>
136
`);
124
-
137
act(() => ReactDOM.unmountComponentAtNode(container));
138
expect(store).toMatchInlineSnapshot(``);
139
});
128
-
140
it('should support mount and update operations for multiple roots', () => {
130
- const Parent = ({count}) => (
131
- <div>
132
- {new Array(count).fill(true).map((_, index) => (
133
- <Child key={index} />
134
- ))}
135
- </div>
136
- );
137
- const Child = () => <div>Hi!</div>;
138
-
141
+ const Parent = ({count}) =>
142
+ React.createElement(
143
+ 'div',
144
+ null,
145
+ new Array(count).fill(true).map((_, index) =>
146
+ React.createElement(Child, {
147
+ key: index,
148
+ }),
149
+ ),
150
+ );
151
+ const Child = () => React.createElement('div', null, 'Hi!');
152
const containerA = document.createElement('div');
153
const containerB = document.createElement('div');
141
-
154
act(() => {
143
- ReactDOM.render(<Parent key="A" count={3} />, containerA);
144
- ReactDOM.render(<Parent key="B" count={2} />, containerB);
155
+ ReactDOM.render(
156
+ React.createElement(Parent, {
157
+ key: 'A',
158
+ count: 3,
159
+ }),
160
+ containerA,
161
+ );
162
+ ReactDOM.render(
163
+ React.createElement(Parent, {
164
+ key: 'B',
165
+ count: 2,
166
+ }),
167
+ containerB,
168
+ );
169
});
170
expect(store).toMatchInlineSnapshot(`
171
[root]
@@ -161,10 +185,21 @@ describe('Store (legacy)', () => {
185
▾ <Child key="1">
186
<div>
187
`);
164
-
188
act(() => {
166
- ReactDOM.render(<Parent key="A" count={4} />, containerA);
167
- ReactDOM.render(<Parent key="B" count={1} />, containerB);
189
+ ReactDOM.render(
190
+ React.createElement(Parent, {
191
+ key: 'A',
192
+ count: 4,
193
+ }),
194
+ containerA,
195
+ );
196
+ ReactDOM.render(
197
+ React.createElement(Parent, {
198
+ key: 'B',
199
+ count: 1,
200
+ }),
201
+ containerB,
202
+ );
203
});
204
expect(store).toMatchInlineSnapshot(`
205
[root]
@@ -184,7 +219,6 @@ describe('Store (legacy)', () => {
219
▾ <Child key="0">
220
<div>
221
`);
187
-
222
act(() => ReactDOM.unmountComponentAtNode(containerB));
223
expect(store).toMatchInlineSnapshot(`
224
[root]
@@ -199,35 +233,46 @@ describe('Store (legacy)', () => {
233
▾ <Child key="3">
234
<div>
235
`);
202
-
236
act(() => ReactDOM.unmountComponentAtNode(containerA));
237
expect(store).toMatchInlineSnapshot(``);
238
});
206
-
239
it('should not filter DOM nodes from the store tree', () => {
208
- const Grandparent = ({flip}) => (
209
- <div>
210
- <div>
211
- <Parent flip={flip} />
212
- </div>
213
- <Parent flip={flip} />
214
- <Nothing />
215
- </div>
216
- );
217
- const Parent = ({flip}) => (
218
- <div>
219
- {flip ? 'foo' : null}
220
- <Child />
221
- {flip && [null, 'hello', 42]}
222
- {flip ? 'bar' : 'baz'}
223
- </div>
224
- );
225
- const Child = () => <div>Hi!</div>;
240
+ const Grandparent = ({flip}) =>
241
+ React.createElement(
242
+ 'div',
243
+ null,
244
+ React.createElement(
245
+ 'div',
246
+ null,
247
+ React.createElement(Parent, {
248
+ flip: flip,
249
+ }),
250
+ ),
251
+ React.createElement(Parent, {
252
+ flip: flip,
253
+ }),
254
+ React.createElement(Nothing, null),
255
+ );
256
+ const Parent = ({flip}) =>
257
+ React.createElement(
258
+ 'div',
259
+ null,
260
+ flip ? 'foo' : null,
261
+ React.createElement(Child, null),
262
+ flip && [null, 'hello', 42],
263
+ flip ? 'bar' : 'baz',
264
+ );
265
+ const Child = () => React.createElement('div', null, 'Hi!');
266
const Nothing = () => null;
227
-
267
const container = document.createElement('div');
268
act(() =>
230
- ReactDOM.render(<Grandparent count={4} flip={false} />, container),
269
+ ReactDOM.render(
270
+ React.createElement(Grandparent, {
271
+ count: 4,
272
+ flip: false,
273
+ }),
274
+ container,
275
+ ),
276
);
277
expect(store).toMatchInlineSnapshot(`
278
[root]
@@ -244,9 +289,14 @@ describe('Store (legacy)', () => {
289
<div>
290
<Nothing>
291
`);
247
-
292
act(() =>
249
- ReactDOM.render(<Grandparent count={4} flip={true} />, container),
293
+ ReactDOM.render(
294
+ React.createElement(Grandparent, {
295
+ count: 4,
296
+ flip: true,
297
+ }),
298
+ container,
299
+ ),
300
);
301
expect(store).toMatchInlineSnapshot(`
302
[root]
@@ -263,30 +313,37 @@ describe('Store (legacy)', () => {
313
<div>
314
<Nothing>
315
`);
266
-
316
act(() => ReactDOM.unmountComponentAtNode(container));
317
expect(store).toMatchInlineSnapshot(``);
318
});
270
-
319
it('should support collapsing parts of the tree', () => {
272
- const Grandparent = ({count}) => (
273
- <div>
274
- <Parent count={count} />
275
- <Parent count={count} />
276
- </div>
277
- );
278
- const Parent = ({count}) => (
279
- <div>
280
- {new Array(count).fill(true).map((_, index) => (
281
- <Child key={index} />
282
- ))}
283
- </div>
284
- );
285
- const Child = () => <div>Hi!</div>;
286
-
320
+ const Grandparent = ({count}) =>
321
+ React.createElement(
322
+ 'div',
323
+ null,
324
+ React.createElement(Parent, {
325
+ count: count,
326
+ }),
327
+ React.createElement(Parent, {
328
+ count: count,
329
+ }),
330
+ );
331
+ const Parent = ({count}) =>
332
+ React.createElement(
333
+ 'div',
334
+ null,
335
+ new Array(count).fill(true).map((_, index) =>
336
+ React.createElement(Child, {
337
+ key: index,
338
+ }),
339
+ ),
340
+ );
341
+ const Child = () => React.createElement('div', null, 'Hi!');
342
act(() =>
343
ReactDOM.render(
289
- <Grandparent count={2} />,
344
+ React.createElement(Grandparent, {
345
+ count: 2,
346
+ }),
347
document.createElement('div'),
348
),
349
);
@@ -307,11 +364,9 @@ describe('Store (legacy)', () => {
364
▾ <Child key="1">
365
<div>
366
`);
310
-
367
const grandparentID = store.getElementIDAtIndex(0);
368
const parentOneID = store.getElementIDAtIndex(2);
369
const parentTwoID = store.getElementIDAtIndex(8);
314
-
370
act(() => store.toggleIsCollapsed(parentOneID, true));
371
expect(store).toMatchInlineSnapshot(`
372
[root]
@@ -325,7 +380,6 @@ describe('Store (legacy)', () => {
380
▾ <Child key="1">
381
<div>
382
`);
328
-
383
act(() => store.toggleIsCollapsed(parentTwoID, true));
384
expect(store).toMatchInlineSnapshot(`
385
[root]
@@ -334,7 +388,6 @@ describe('Store (legacy)', () => {
388
▸ <Parent>
389
▸ <Parent>
390
`);
337
-
391
act(() => store.toggleIsCollapsed(parentOneID, false));
392
expect(store).toMatchInlineSnapshot(`
393
[root]
@@ -348,13 +401,11 @@ describe('Store (legacy)', () => {
401
<div>
402
▸ <Parent>
403
`);
351
-
404
act(() => store.toggleIsCollapsed(grandparentID, true));
405
expect(store).toMatchInlineSnapshot(`
406
[root]
407
▸ <Grandparent>
408
`);
357
-
409
act(() => store.toggleIsCollapsed(grandparentID, false));
410
expect(store).toMatchInlineSnapshot(`
411
[root]
@@ -369,18 +420,19 @@ describe('Store (legacy)', () => {
420
▸ <Parent>
421
`);
422
});
372
-
423
it('should support adding and removing children', () => {
374
- const Root = ({children}) => <div>{children}</div>;
375
- const Component = () => <div />;
376
-
424
+ const Root = ({children}) => React.createElement('div', null, children);
425
+ const Component = () => React.createElement('div', null);
426
const container = document.createElement('div');
378
-
427
act(() =>
428
ReactDOM.render(
381
- <Root>
382
- <Component key="a" />
383
- </Root>,
429
+ React.createElement(
430
+ Root,
431
+ null,
432
+ React.createElement(Component, {
433
+ key: 'a',
434
+ }),
435
+ ),
436
container,
437
),
438
);
@@ -391,13 +443,18 @@ describe('Store (legacy)', () => {
443
▾ <Component key="a">
444
<div>
445
`);
394
-
446
act(() =>
447
ReactDOM.render(
397
- <Root>
398
- <Component key="a" />
399
- <Component key="b" />
400
- </Root>,
448
+ React.createElement(
449
+ Root,
450
+ null,
451
+ React.createElement(Component, {
452
+ key: 'a',
453
+ }),
454
+ React.createElement(Component, {
455
+ key: 'b',
456
+ }),
457
+ ),
458
container,
459
),
460
);
@@ -410,12 +467,15 @@ describe('Store (legacy)', () => {
467
▾ <Component key="b">
468
<div>
469
`);
413
-
470
act(() =>
471
ReactDOM.render(
416
- <Root>
417
- <Component key="b" />
418
- </Root>,
472
+ React.createElement(
473
+ Root,
474
+ null,
475
+ React.createElement(Component, {
476
+ key: 'b',
477
+ }),
478
+ ),
479
container,
480
),
481
);
@@ -427,21 +487,34 @@ describe('Store (legacy)', () => {
487
<div>
488
`);
489
});
430
-
490
it('should support reordering of children', () => {
432
- const Root = ({children}) => <div>{children}</div>;
433
- const Component = () => <div />;
434
-
435
- const Foo = () => <div>{[<Component key="0" />]}</div>;
436
- const Bar = () => (
437
- <div>{[<Component key="0" />, <Component key="1" />]}</div>
438
- );
439
- const foo = <Foo key="foo" />;
440
- const bar = <Bar key="bar" />;
441
-
491
+ const Root = ({children}) => React.createElement('div', null, children);
492
+ const Component = () => React.createElement('div', null);
493
+ const Foo = () =>
494
+ React.createElement('div', null, [
495
+ React.createElement(Component, {
496
+ key: '0',
497
+ }),
498
+ ]);
499
+ const Bar = () =>
500
+ React.createElement('div', null, [
501
+ React.createElement(Component, {
502
+ key: '0',
503
+ }),
504
+ React.createElement(Component, {
505
+ key: '1',
506
+ }),
507
+ ]);
508
+ const foo = React.createElement(Foo, {
509
+ key: 'foo',
510
+ });
511
+ const bar = React.createElement(Bar, {
512
+ key: 'bar',
513
+ });
514
const container = document.createElement('div');
443
-
444
- act(() => ReactDOM.render(<Root>{[foo, bar]}</Root>, container));
515
+ act(() =>
516
+ ReactDOM.render(React.createElement(Root, null, [foo, bar]), container),
517
+ );
518
expect(store).toMatchInlineSnapshot(`
519
[root]
520
▾ <Root>
@@ -457,8 +530,9 @@ describe('Store (legacy)', () => {
530
▾ <Component key="1">
531
<div>
532
`);
460
-
461
- act(() => ReactDOM.render(<Root>{[bar, foo]}</Root>, container));
533
+ act(() =>
534
+ ReactDOM.render(React.createElement(Root, null, [bar, foo]), container),
535
+ );
536
expect(store).toMatchInlineSnapshot(`
537
[root]
538
▾ <Root>
@@ -474,13 +548,11 @@ describe('Store (legacy)', () => {
548
▾ <Component key="0">
549
<div>
550
`);
477
-
551
act(() => store.toggleIsCollapsed(store.getElementIDAtIndex(0), true));
552
expect(store).toMatchInlineSnapshot(`
553
[root]
554
▸ <Root>
555
`);
483
-
556
act(() => store.toggleIsCollapsed(store.getElementIDAtIndex(0), false));
557
expect(store).toMatchInlineSnapshot(`
558
[root]
@@ -499,30 +571,35 @@ describe('Store (legacy)', () => {
571
`);
572
});
573
});
502
-
574
describe('collapseNodesByDefault:true', () => {
575
beforeEach(() => {
576
store.collapseNodesByDefault = true;
577
});
507
-
578
it('should support mount and update operations', () => {
509
- const Parent = ({count}) => (
510
- <div>
511
- {new Array(count).fill(true).map((_, index) => (
512
- <Child key={index} />
513
- ))}
514
- </div>
515
- );
516
- const Child = () => <div>Hi!</div>;
517
-
579
+ const Parent = ({count}) =>
580
+ React.createElement(
581
+ 'div',
582
+ null,
583
+ new Array(count).fill(true).map((_, index) =>
584
+ React.createElement(Child, {
585
+ key: index,
586
+ }),
587
+ ),
588
+ );
589
+ const Child = () => React.createElement('div', null, 'Hi!');
590
const container = document.createElement('div');
519
-
591
act(() =>
592
ReactDOM.render(
522
- <div>
523
- <Parent count={1} />
524
- <Parent count={3} />
525
- </div>,
593
+ React.createElement(
594
+ 'div',
595
+ null,
596
+ React.createElement(Parent, {
597
+ count: 1,
598
+ }),
599
+ React.createElement(Parent, {
600
+ count: 3,
601
+ }),
602
+ ),
603
container,
604
),
605
);
@@ -530,13 +607,18 @@ describe('Store (legacy)', () => {
607
[root]
608
▸ <div>
609
`);
533
-
610
act(() =>
611
ReactDOM.render(
536
- <div>
537
- <Parent count={2} />
538
- <Parent count={1} />
539
- </div>,
612
+ React.createElement(
613
+ 'div',
614
+ null,
615
+ React.createElement(Parent, {
616
+ count: 2,
617
+ }),
618
+ React.createElement(Parent, {
619
+ count: 1,
620
+ }),
621
+ ),
622
container,
623
),
624
);
@@ -544,27 +626,38 @@ describe('Store (legacy)', () => {
626
[root]
627
▸ <div>
628
`);
547
-
629
act(() => ReactDOM.unmountComponentAtNode(container));
630
expect(store).toMatchInlineSnapshot(``);
631
});
551
-
632
it('should support mount and update operations for multiple roots', () => {
553
- const Parent = ({count}) => (
554
- <div>
555
- {new Array(count).fill(true).map((_, index) => (
556
- <Child key={index} />
557
- ))}
558
- </div>
559
- );
560
- const Child = () => <div>Hi!</div>;
561
-
633
+ const Parent = ({count}) =>
634
+ React.createElement(
635
+ 'div',
636
+ null,
637
+ new Array(count).fill(true).map((_, index) =>
638
+ React.createElement(Child, {
639
+ key: index,
640
+ }),
641
+ ),
642
+ );
643
+ const Child = () => React.createElement('div', null, 'Hi!');
644
const containerA = document.createElement('div');
645
const containerB = document.createElement('div');
564
-
646
act(() => {
566
- ReactDOM.render(<Parent key="A" count={3} />, containerA);
567
- ReactDOM.render(<Parent key="B" count={2} />, containerB);
647
+ ReactDOM.render(
648
+ React.createElement(Parent, {
649
+ key: 'A',
650
+ count: 3,
651
+ }),
652
+ containerA,
653
+ );
654
+ ReactDOM.render(
655
+ React.createElement(Parent, {
656
+ key: 'B',
657
+ count: 2,
658
+ }),
659
+ containerB,
660
+ );
661
});
662
expect(store).toMatchInlineSnapshot(`
663
[root]
@@ -572,10 +665,21 @@ describe('Store (legacy)', () => {
665
[root]
666
▸ <Parent key="B">
667
`);
575
-
668
act(() => {
577
- ReactDOM.render(<Parent key="A" count={4} />, containerA);
578
- ReactDOM.render(<Parent key="B" count={1} />, containerB);
669
+ ReactDOM.render(
670
+ React.createElement(Parent, {
671
+ key: 'A',
672
+ count: 4,
673
+ }),
674
+ containerA,
675
+ );
676
+ ReactDOM.render(
677
+ React.createElement(Parent, {
678
+ key: 'B',
679
+ count: 1,
680
+ }),
681
+ containerB,
682
+ );
683
});
684
expect(store).toMatchInlineSnapshot(`
685
[root]
@@ -583,54 +687,62 @@ describe('Store (legacy)', () => {
687
[root]
688
▸ <Parent key="B">
689
`);
586
-
690
act(() => ReactDOM.unmountComponentAtNode(containerB));
691
expect(store).toMatchInlineSnapshot(`
692
[root]
693
▸ <Parent key="A">
694
`);
592
-
695
act(() => ReactDOM.unmountComponentAtNode(containerA));
696
expect(store).toMatchInlineSnapshot(``);
697
});
596
-
698
it('should not filter DOM nodes from the store tree', () => {
598
- const Grandparent = ({flip}) => (
599
- <div>
600
- <div>
601
- <Parent flip={flip} />
602
- </div>
603
- <Parent flip={flip} />
604
- <Nothing />
605
- </div>
606
- );
607
- const Parent = ({flip}) => (
608
- <div>
609
- {flip ? 'foo' : null}
610
- <Child />
611
- {flip && [null, 'hello', 42]}
612
- {flip ? 'bar' : 'baz'}
613
- </div>
614
- );
615
- const Child = () => <div>Hi!</div>;
699
+ const Grandparent = ({flip}) =>
700
+ React.createElement(
701
+ 'div',
702
+ null,
703
+ React.createElement(
704
+ 'div',
705
+ null,
706
+ React.createElement(Parent, {
707
+ flip: flip,
708
+ }),
709
+ ),
710
+ React.createElement(Parent, {
711
+ flip: flip,
712
+ }),
713
+ React.createElement(Nothing, null),
714
+ );
715
+ const Parent = ({flip}) =>
716
+ React.createElement(
717
+ 'div',
718
+ null,
719
+ flip ? 'foo' : null,
720
+ React.createElement(Child, null),
721
+ flip && [null, 'hello', 42],
722
+ flip ? 'bar' : 'baz',
723
+ );
724
+ const Child = () => React.createElement('div', null, 'Hi!');
725
const Nothing = () => null;
617
-
726
const container = document.createElement('div');
727
act(() =>
620
- ReactDOM.render(<Grandparent count={4} flip={false} />, container),
728
+ ReactDOM.render(
729
+ React.createElement(Grandparent, {
730
+ count: 4,
731
+ flip: false,
732
+ }),
733
+ container,
734
+ ),
735
);
736
expect(store).toMatchInlineSnapshot(`
737
[root]
738
▸ <Grandparent>
739
`);
626
-
740
act(() => store.toggleIsCollapsed(store.getElementIDAtIndex(0), false));
741
expect(store).toMatchInlineSnapshot(`
742
[root]
743
▾ <Grandparent>
744
▸ <div>
745
`);
633
-
746
act(() => store.toggleIsCollapsed(store.getElementIDAtIndex(1), false));
747
expect(store).toMatchInlineSnapshot(`
748
[root]
@@ -640,9 +752,14 @@ describe('Store (legacy)', () => {
752
▸ <Parent>
753
<Nothing>
754
`);
643
-
755
act(() =>
645
- ReactDOM.render(<Grandparent count={4} flip={true} />, container),
756
+ ReactDOM.render(
757
+ React.createElement(Grandparent, {
758
+ count: 4,
759
+ flip: true,
760
+ }),
761
+ container,
762
+ ),
763
);
764
expect(store).toMatchInlineSnapshot(`
765
[root]
@@ -652,30 +769,37 @@ describe('Store (legacy)', () => {
769
▸ <Parent>
770
<Nothing>
771
`);
655
-
772
act(() => ReactDOM.unmountComponentAtNode(container));
773
expect(store).toMatchInlineSnapshot(``);
774
});
659
-
775
it('should support expanding parts of the tree', () => {
661
- const Grandparent = ({count}) => (
662
- <div>
663
- <Parent count={count} />
664
- <Parent count={count} />
665
- </div>
666
- );
667
- const Parent = ({count}) => (
668
- <div>
669
- {new Array(count).fill(true).map((_, index) => (
670
- <Child key={index} />
671
- ))}
672
- </div>
673
- );
674
- const Child = () => <div>Hi!</div>;
675
-
776
+ const Grandparent = ({count}) =>
777
+ React.createElement(
778
+ 'div',
779
+ null,
780
+ React.createElement(Parent, {
781
+ count: count,
782
+ }),
783
+ React.createElement(Parent, {
784
+ count: count,
785
+ }),
786
+ );
787
+ const Parent = ({count}) =>
788
+ React.createElement(
789
+ 'div',
790
+ null,
791
+ new Array(count).fill(true).map((_, index) =>
792
+ React.createElement(Child, {
793
+ key: index,
794
+ }),
795
+ ),
796
+ );
797
+ const Child = () => React.createElement('div', null, 'Hi!');
798
act(() =>
799
ReactDOM.render(
678
- <Grandparent count={2} />,
800
+ React.createElement(Grandparent, {
801
+ count: 2,
802
+ }),
803
document.createElement('div'),
804
),
805
);
@@ -683,16 +807,13 @@ describe('Store (legacy)', () => {
807
[root]
808
▸ <Grandparent>
809
`);
686
-
810
const grandparentID = store.getElementIDAtIndex(0);
688
-
811
act(() => store.toggleIsCollapsed(grandparentID, false));
812
expect(store).toMatchInlineSnapshot(`
813
[root]
814
▾ <Grandparent>
815
▸ <div>
816
`);
695
-
817
const parentDivID = store.getElementIDAtIndex(1);
818
act(() => store.toggleIsCollapsed(parentDivID, false));
819
expect(store).toMatchInlineSnapshot(`
@@ -702,10 +823,8 @@ describe('Store (legacy)', () => {
823
▸ <Parent>
824
▸ <Parent>
825
`);
705
-
826
const parentOneID = store.getElementIDAtIndex(2);
827
const parentTwoID = store.getElementIDAtIndex(3);
708
-
828
act(() => store.toggleIsCollapsed(parentOneID, false));
829
expect(store).toMatchInlineSnapshot(`
830
[root]
@@ -715,7 +834,6 @@ describe('Store (legacy)', () => {
834
▸ <div>
835
▸ <Parent>
836
`);
718
-
837
act(() => store.toggleIsCollapsed(parentTwoID, false));
838
expect(store).toMatchInlineSnapshot(`
839
[root]
@@ -726,7 +844,6 @@ describe('Store (legacy)', () => {
844
▾ <Parent>
845
▸ <div>
846
`);
729
-
847
act(() => store.toggleIsCollapsed(parentOneID, true));
848
expect(store).toMatchInlineSnapshot(`
849
[root]
@@ -736,7 +853,6 @@ describe('Store (legacy)', () => {
853
▾ <Parent>
854
▸ <div>
855
`);
739
-
856
act(() => store.toggleIsCollapsed(parentTwoID, true));
857
expect(store).toMatchInlineSnapshot(`
858
[root]
@@ -745,7 +861,6 @@ describe('Store (legacy)', () => {
861
▸ <Parent>
862
▸ <Parent>
863
`);
748
-
864
act(() => store.toggleIsCollapsed(grandparentID, true));
865
expect(store).toMatchInlineSnapshot(`
866
[root]
@@ -760,24 +875,29 @@ describe('Store (legacy)', () => {
875
// one can use an older transform.
876
if (!require('shared/ReactFeatureFlags').enableRefAsProp) {
877
it('should support expanding deep parts of the tree', () => {
763
- const Wrapper = ({forwardedRef}) => (
764
- <Nested depth={3} forwardedRef={forwardedRef} />
765
- );
878
+ const Wrapper = ({forwardedRef}) =>
879
+ React.createElement(Nested, {
880
+ depth: 3,
881
+ forwardedRef: forwardedRef,
882
+ });
883
const Nested = ({depth, forwardedRef}) =>
767
- depth > 0 ? (
768
- <Nested depth={depth - 1} forwardedRef={forwardedRef} />
769
- ) : (
770
- <div ref={forwardedRef} />
771
- );
772
-
884
+ depth > 0
885
+ ? React.createElement(Nested, {
886
+ depth: depth - 1,
887
+ forwardedRef: forwardedRef,
888
+ })
889
+ : React.createElement('div', {
890
+ ref: forwardedRef,
891
+ });
892
let ref = null;
893
const refSetter = value => {
894
ref = value;
895
};
777
-
896
act(() =>
897
ReactDOM.render(
780
- <Wrapper forwardedRef={refSetter} />,
898
+ React.createElement(Wrapper, {
899
+ forwardedRef: refSetter,
900
+ }),
901
document.createElement('div'),
902
),
903
);
@@ -785,9 +905,7 @@ describe('Store (legacy)', () => {
905
[root]
906
▸ <Wrapper>
907
`);
788
-
908
const deepestedNodeID = global.agent.getIDForNode(ref);
790
-
909
act(() => store.toggleIsCollapsed(deepestedNodeID, false));
910
expect(store).toMatchInlineSnapshot(`
911
[root]
@@ -798,15 +916,12 @@ describe('Store (legacy)', () => {
916
▾ <Nested>
917
<div>
918
`);
801
-
919
const rootID = store.getElementIDAtIndex(0);
803
-
920
act(() => store.toggleIsCollapsed(rootID, true));
921
expect(store).toMatchInlineSnapshot(`
922
[root]
923
▸ <Wrapper>
924
`);
809
-
925
act(() => store.toggleIsCollapsed(rootID, false));
926
expect(store).toMatchInlineSnapshot(`
927
[root]
@@ -817,16 +932,13 @@ describe('Store (legacy)', () => {
932
▾ <Nested>
933
<div>
934
`);
820
-
935
const id = store.getElementIDAtIndex(1);
822
-
936
act(() => store.toggleIsCollapsed(id, true));
937
expect(store).toMatchInlineSnapshot(`
938
[root]
939
▾ <Wrapper>
940
▸ <Nested>
941
`);
829
-
942
act(() => store.toggleIsCollapsed(id, false));
943
expect(store).toMatchInlineSnapshot(`
944
[root]
@@ -839,39 +951,51 @@ describe('Store (legacy)', () => {
951
`);
952
});
953
}
842
-
954
it('should support reordering of children', () => {
844
- const Root = ({children}) => <div>{children}</div>;
845
- const Component = () => <div />;
846
-
847
- const Foo = () => <div>{[<Component key="0" />]}</div>;
848
- const Bar = () => (
849
- <div>{[<Component key="0" />, <Component key="1" />]}</div>
850
- );
851
- const foo = <Foo key="foo" />;
852
- const bar = <Bar key="bar" />;
853
-
955
+ const Root = ({children}) => React.createElement('div', null, children);
956
+ const Component = () => React.createElement('div', null);
957
+ const Foo = () =>
958
+ React.createElement('div', null, [
959
+ React.createElement(Component, {
960
+ key: '0',
961
+ }),
962
+ ]);
963
+ const Bar = () =>
964
+ React.createElement('div', null, [
965
+ React.createElement(Component, {
966
+ key: '0',
967
+ }),
968
+ React.createElement(Component, {
969
+ key: '1',
970
+ }),
971
+ ]);
972
+ const foo = React.createElement(Foo, {
973
+ key: 'foo',
974
+ });
975
+ const bar = React.createElement(Bar, {
976
+ key: 'bar',
977
+ });
978
const container = document.createElement('div');
855
-
856
- act(() => ReactDOM.render(<Root>{[foo, bar]}</Root>, container));
979
+ act(() =>
980
+ ReactDOM.render(React.createElement(Root, null, [foo, bar]), container),
981
+ );
982
expect(store).toMatchInlineSnapshot(`
983
[root]
984
▸ <Root>
985
`);
861
-
862
- act(() => ReactDOM.render(<Root>{[bar, foo]}</Root>, container));
986
+ act(() =>
987
+ ReactDOM.render(React.createElement(Root, null, [bar, foo]), container),
988
+ );
989
expect(store).toMatchInlineSnapshot(`
990
[root]
991
▸ <Root>
992
`);
867
-
993
act(() => store.toggleIsCollapsed(store.getElementIDAtIndex(0), false));
994
expect(store).toMatchInlineSnapshot(`
995
[root]
996
▾ <Root>
997
▸ <div>
998
`);
874
-
999
act(() => store.toggleIsCollapsed(store.getElementIDAtIndex(1), false));
1000
expect(store).toMatchInlineSnapshot(`
1001
[root]
@@ -880,7 +1004,6 @@ describe('Store (legacy)', () => {
1004
▸ <Bar key="bar">
1005
▸ <Foo key="foo">
1006
`);
883
-
1007
act(() => {
1008
store.toggleIsCollapsed(store.getElementIDAtIndex(3), false);
1009
store.toggleIsCollapsed(store.getElementIDAtIndex(2), false);
@@ -894,7 +1017,6 @@ describe('Store (legacy)', () => {
1017
▾ <Foo key="foo">
1018
▸ <div>
1019
`);
897
-
1020
act(() => store.toggleIsCollapsed(store.getElementIDAtIndex(0), true));
1021
expect(store).toMatchInlineSnapshot(`
1022
[root]
@@ -902,14 +1024,11 @@ describe('Store (legacy)', () => {
1024
`);
1025
});
1026
});
905
-
1027
describe('StrictMode compliance', () => {
1028
it('should mark all elements as strict mode compliant', () => {
1029
const App = () => null;
909
-
1030
const container = document.createElement('div');
911
- act(() => ReactDOM.render(<App />, container));
912
-
1031
+ act(() => ReactDOM.render(React.createElement(App, null), container));
1032
expect(store.getElementAtIndex(0).isStrictModeNonCompliant).toBe(false);
1033
});
1034
});
packages/react-devtools-shared/src/devtools/cache.js
+1
-1
@@ -60,7 +60,7 @@ const Resolved = 1;
60
const Rejected = 2;
61
62
const ReactSharedInternals = (React: any)
63
- .__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
63
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
64
65
function readContext(Context: ReactContext<null>) {
66
const dispatcher = ReactSharedInternals.H;
packages/react-dom/client.js
+1
-1
@@ -19,7 +19,7 @@ import type {
19
import {
20
createRoot as createRootImpl,
21
hydrateRoot as hydrateRootImpl,
22
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as Internals,
22
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE as Internals,
23
} from './';
24
25
export function createRoot(
packages/react-dom/index.classic.fb.js
+1
-1
@@ -44,4 +44,4 @@ export {
44
unmountComponentAtNode,
45
} from './src/client/ReactDOMRootFB';
46
47
-export {Internals as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED};
47
+export {Internals as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE};
packages/react-dom/index.experimental.js
+1
-1
@@ -7,7 +7,7 @@
7
* @flow
8
*/
9
10
-export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals';
10
+export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals';
11
export {
12
createPortal,
13
createRoot,
packages/react-dom/index.js
+1
-1
@@ -9,7 +9,7 @@
9
10
// Export all exports so that they're available in tests.
11
// We can't use export * from in Flow for some reason.
12
-export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals';
12
+export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals';
13
export {
14
createPortal,
15
createRoot,
packages/react-dom/index.modern.fb.js
+1
-1
@@ -7,7 +7,7 @@
7
* @flow
8
*/
9
10
-export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternalsFB';
10
+export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternalsFB';
11
export {
12
createPortal,
13
flushSync,
packages/react-dom/index.stable.js
+1
-1
@@ -7,7 +7,7 @@
7
* @flow
8
*/
9
10
-export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals';
10
+export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals';
11
export {
12
createPortal,
13
createRoot,
packages/react-dom/npm/client.js
+1
-1
@@ -5,7 +5,7 @@ if (process.env.NODE_ENV === 'production') {
5
exports.createRoot = m.createRoot;
6
exports.hydrateRoot = m.hydrateRoot;
7
} else {
8
- var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
8
+ var i = m.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
9
exports.createRoot = function (c, o) {
10
i.usingClientEntryPoint = true;
11
try {
packages/react-dom/server-rendering-stub.js
+1
-1
@@ -13,7 +13,7 @@
13
import ReactVersion from 'shared/ReactVersion';
14
export {ReactVersion as version};
15
16
-export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './src/ReactDOMSharedInternals';
16
+export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './src/ReactDOMSharedInternals';
17
18
export {
19
createPortal,
packages/react-dom/src/ReactDOMServer.js
+1
-1
@@ -8,7 +8,7 @@
8
*/
9
10
// This is the subset of APIs that can be accessed from Server Component modules
11
-export {default as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './ReactDOMSharedInternals';
11
+export {default as __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './ReactDOMSharedInternals';
12
export {
13
prefetchDNS,
14
preconnect,
packages/react-dom/src/__tests__/ReactCompositeComponent-test.js
+1
-1
@@ -68,7 +68,7 @@ describe('ReactCompositeComponent', () => {
68
ReactDOM = require('react-dom');
69
ReactDOMClient = require('react-dom/client');
70
ReactSharedInternals =
71
- require('react').__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
71
+ require('react').__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
72
Scheduler = require('scheduler');
73
assertLog = require('internal-test-utils').assertLog;
74
act = require('internal-test-utils').act;
packages/react-dom/src/__tests__/ReactDOM-test.js
+2
-1
@@ -23,7 +23,8 @@ describe('ReactDOM', () => {
23
React = require('react');
24
ReactDOM = require('react-dom');
25
findDOMNode =
26
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode;
26
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
27
+ .findDOMNode;
28
ReactDOMClient = require('react-dom/client');
29
ReactDOMServer = require('react-dom/server');
30
packages/react-dom/src/__tests__/ReactDOMComponent-test.js
+1
-1
@@ -2121,7 +2121,7 @@ describe('ReactDOMComponent', () => {
2121
componentWillUnmount() {
2122
// Should not throw
2123
expect(
2124
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
2124
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
2125
this,
2126
).nodeName,
2127
).toBe('SPAN');
packages/react-dom/src/__tests__/ReactDOMEventListener-test.js
+2
-2
@@ -115,14 +115,14 @@ describe('ReactDOMEventListener', () => {
115
};
116
componentDidMount() {
117
expect(
118
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
118
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
119
this,
120
),
121
).toBe(container.firstChild);
122
}
123
componentDidUpdate() {
124
expect(
125
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
125
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
126
this,
127
),
128
).toBe(container.firstChild);
packages/react-dom/src/__tests__/ReactDOMLegacyFiber-test.js
+6
-6
@@ -112,7 +112,7 @@ describe('ReactDOMLegacyFiber', () => {
112
);
113
114
const textNode =
115
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
115
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
116
instance,
117
);
118
expect(textNode).toBe(container.firstChild);
@@ -134,7 +134,7 @@ describe('ReactDOMLegacyFiber', () => {
134
expect(container.childNodes.length).toBe(2);
135
136
const firstNode =
137
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
137
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
138
instance,
139
);
140
expect(firstNode).toBe(container.firstChild);
@@ -166,7 +166,7 @@ describe('ReactDOMLegacyFiber', () => {
166
expect(container.childNodes.length).toBe(2);
167
168
const firstNode =
169
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
169
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
170
instance,
171
);
172
expect(firstNode).toBe(container.firstChild);
@@ -193,7 +193,7 @@ describe('ReactDOMLegacyFiber', () => {
193
expect(container.childNodes.length).toBe(2);
194
195
const firstNode =
196
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
196
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
197
instance,
198
);
199
expect(firstNode).toBe(container.firstChild);
@@ -891,7 +891,7 @@ describe('ReactDOMLegacyFiber', () => {
891
892
const myNodeA = ReactDOM.render(<MyNode />, container);
893
const a =
894
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
894
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
895
myNodeA,
896
);
897
expect(a.tagName).toBe('DIV');
@@ -900,7 +900,7 @@ describe('ReactDOMLegacyFiber', () => {
900
expect(myNodeA === myNodeB).toBe(true);
901
902
const b =
903
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode(
903
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode(
904
myNodeB,
905
);
906
expect(b.tagName).toBe('SPAN');
packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
+1
-1
@@ -775,7 +775,7 @@ describe('ReactDOMServerHooks', () => {
775
describe('readContext', () => {
776
function readContext(Context) {
777
const dispatcher =
778
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
778
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.H;
779
return dispatcher.readContext(Context);
780
}
781
packages/react-dom/src/__tests__/ReactDOMServerIntegrationNewContext-test.js
+2
-1
@@ -161,7 +161,8 @@ describe('ReactDOMServerIntegration', () => {
161
itRenders('readContext() in different components', async render => {
162
function readContext(Ctx) {
163
const dispatcher =
164
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
164
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
165
+ .H;
166
return dispatcher.readContext(Ctx);
167
}
168
packages/react-dom/src/__tests__/ReactDOMSuspensePlaceholder-test.js
+2
-1
@@ -26,7 +26,8 @@ describe('ReactDOMSuspensePlaceholder', () => {
26
React = require('react');
27
ReactDOM = require('react-dom');
28
findDOMNode =
29
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode;
29
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
30
+ .findDOMNode;
31
ReactDOMClient = require('react-dom/client');
32
Scheduler = require('scheduler');
33
act = require('internal-test-utils').act;
packages/react-dom/src/__tests__/ReactEmptyComponent-test.js
+2
-1
@@ -27,7 +27,8 @@ describe('ReactEmptyComponent', () => {
27
React = require('react');
28
ReactDOM = require('react-dom');
29
findDOMNode =
30
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode;
30
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
31
+ .findDOMNode;
32
ReactDOMClient = require('react-dom/client');
33
Scheduler = require('scheduler');
34
const InternalTestUtils = require('internal-test-utils');
packages/react-dom/src/__tests__/ReactLegacyCompositeComponent-test.js
+2
-1
@@ -22,7 +22,8 @@ describe('ReactLegacyCompositeComponent', () => {
22
React = require('react');
23
ReactDOM = require('react-dom');
24
findDOMNode =
25
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode;
25
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
26
+ .findDOMNode;
27
ReactDOMClient = require('react-dom/client');
28
PropTypes = require('prop-types');
29
act = require('internal-test-utils').act;
packages/react-dom/src/__tests__/ReactLegacyUpdates-test.js
+2
-1
@@ -24,7 +24,8 @@ describe('ReactLegacyUpdates', () => {
24
React = require('react');
25
ReactDOM = require('react-dom');
26
findDOMNode =
27
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode;
27
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
28
+ .findDOMNode;
29
act = require('internal-test-utils').act;
30
Scheduler = require('scheduler');
31
packages/react-dom/src/__tests__/ReactServerRendering-test.js
+1
-1
@@ -22,7 +22,7 @@ describe('ReactDOMServer', () => {
22
PropTypes = require('prop-types');
23
ReactDOMServer = require('react-dom/server');
24
ReactSharedInternals =
25
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
25
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
26
});
27
28
describe('renderToString', () => {
packages/react-dom/src/__tests__/ReactUpdates-test.js
+2
-1
@@ -25,7 +25,8 @@ describe('ReactUpdates', () => {
25
React = require('react');
26
ReactDOM = require('react-dom');
27
findDOMNode =
28
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode;
28
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
29
+ .findDOMNode;
30
ReactDOMClient = require('react-dom/client');
31
act = require('internal-test-utils').act;
32
Scheduler = require('scheduler');
packages/react-dom/src/__tests__/react-dom-server-rendering-stub-test.js
+2
-1
@@ -31,7 +31,8 @@ describe('react-dom-server-rendering-stub', () => {
31
expect(ReactDOM.hydrateRoot).toBe(undefined);
32
expect(ReactDOM.findDOMNode).toBe(undefined);
33
expect(
34
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findDOMNode,
34
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
35
+ .findDOMNode,
36
).toBe(null);
37
expect(ReactDOM.hydrate).toBe(undefined);
38
expect(ReactDOM.render).toBe(undefined);
packages/react-dom/src/test-utils/ReactTestUtilsFB.js
+1
-1
@@ -27,7 +27,7 @@ import isArray from 'shared/isArray';
27
28
// Keep in sync with ReactDOM.js:
29
const SecretInternals =
30
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
31
const EventInternals = SecretInternals.Events;
32
const getInstanceFromNode = EventInternals[0];
33
const getNodeFromInstance = EventInternals[1];
packages/react-dom/unstable_testing.classic.fb.js
+1
-1
@@ -26,7 +26,7 @@ export {
26
preinit,
27
preinitModule,
28
version,
29
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
29
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
30
} from './index.classic.fb.js';
31
32
export {createRoot, hydrateRoot} from './client.js';
packages/react-dom/unstable_testing.experimental.js
+1
-1
@@ -20,7 +20,7 @@ export {
20
preinit,
21
preinitModule,
22
version,
23
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
23
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
24
} from './index.experimental.js';
25
26
export {createRoot, hydrateRoot} from './client.js';
packages/react-dom/unstable_testing.modern.fb.js
+1
-1
@@ -21,7 +21,7 @@ export {
21
preinit,
22
preinitModule,
23
version,
24
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
24
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
25
} from './index.modern.fb.js';
26
export {createRoot, hydrateRoot} from './client.js';
27
export {
packages/react-dom/unstable_testing.stable.js
+1
-1
@@ -20,6 +20,6 @@ export {
20
preinit,
21
preinitModule,
22
version,
23
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
23
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
24
} from './index.stable.js';
25
export {createRoot, hydrateRoot} from './client.js';
packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js
+8
-8
@@ -949,7 +949,7 @@ describe('ReactHooks', () => {
949
it('warns when reading context inside useMemo', async () => {
950
const {useMemo, createContext} = React;
951
const ReactSharedInternals =
952
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
952
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
953
954
const ThemeContext = createContext('light');
955
function App() {
@@ -968,7 +968,7 @@ describe('ReactHooks', () => {
968
it('warns when reading context inside useMemo after reading outside it', async () => {
969
const {useMemo, createContext} = React;
970
const ReactSharedInternals =
971
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
971
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
972
973
const ThemeContext = createContext('light');
974
let firstRead, secondRead;
@@ -994,7 +994,7 @@ describe('ReactHooks', () => {
994
it('throws when reading context inside useEffect', async () => {
995
const {useEffect, createContext} = React;
996
const ReactSharedInternals =
997
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
997
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
998
999
const ThemeContext = createContext('light');
1000
function App() {
@@ -1015,7 +1015,7 @@ describe('ReactHooks', () => {
1015
it('throws when reading context inside useLayoutEffect', async () => {
1016
const {useLayoutEffect, createContext} = React;
1017
const ReactSharedInternals =
1018
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1018
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
1019
1020
const ThemeContext = createContext('light');
1021
function App() {
@@ -1038,7 +1038,7 @@ describe('ReactHooks', () => {
1038
it('warns when reading context inside useReducer', async () => {
1039
const {useReducer, createContext} = React;
1040
const ReactSharedInternals =
1041
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1041
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
1042
1043
const ThemeContext = createContext('light');
1044
function App() {
@@ -1065,7 +1065,7 @@ describe('ReactHooks', () => {
1065
const ThemeContext = createContext('light');
1066
1067
const ReactSharedInternals =
1068
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1068
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
1069
1070
let _setState;
1071
function Fn() {
@@ -1155,7 +1155,7 @@ describe('ReactHooks', () => {
1155
1156
it('resets warning internal state when interrupted by an error', async () => {
1157
const ReactSharedInternals =
1158
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1158
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
1159
1160
const ThemeContext = React.createContext('light');
1161
function App() {
@@ -1243,7 +1243,7 @@ describe('ReactHooks', () => {
1243
it('warns when reading context inside useMemo', async () => {
1244
const {useMemo, createContext} = React;
1245
const ReactSharedInternals =
1246
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1246
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
1247
1248
const ThemeContext = createContext('light');
1249
function App() {
packages/react-reconciler/src/__tests__/ReactMemo-test.js
+3
-1
@@ -138,7 +138,9 @@ describe('memo', () => {
138
139
function readContext(Context) {
140
const dispatcher =
141
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
141
+ React
142
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
143
+ .H;
144
return dispatcher.readContext(Context);
145
}
146
packages/react-reconciler/src/__tests__/ReactNewContext-test.js
+1
-1
@@ -49,7 +49,7 @@ describe('ReactNewContext', () => {
49
50
function readContext(Context) {
51
const dispatcher =
52
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.H;
52
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.H;
53
return dispatcher.readContext(Context);
54
}
55
packages/react-server/src/ReactSharedInternalsServer.js
+1
-1
@@ -11,7 +11,7 @@ import * as React from 'react';
11
12
const ReactSharedInternalsServer =
13
// $FlowFixMe: It's defined in the one we resolve to.
14
- React.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
14
+ React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
15
16
if (!ReactSharedInternalsServer) {
17
throw new Error(
packages/react/index.classic.fb.js
+1
-1
@@ -8,7 +8,7 @@
8
*/
9
10
export {
11
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
11
+ __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
12
act,
13
Children,
14
Component,
packages/react/index.experimental.js
+1
-1
@@ -8,7 +8,7 @@
8
*/
9
10
export {
11
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
11
+ __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
12
act,
13
Children,
14
Component,
packages/react/index.js
+1
-1
@@ -29,7 +29,7 @@ export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T;
29
// Export all exports so that they're available in tests.
30
// We can't use export * from in Flow for some reason.
31
export {
32
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
32
+ __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
33
act,
34
Children,
35
Component,
packages/react/index.modern.fb.js
+1
-1
@@ -8,7 +8,7 @@
8
*/
9
10
export {
11
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
11
+ __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
12
act,
13
Children,
14
Component,
packages/react/index.stable.js
+1
-1
@@ -8,7 +8,7 @@
8
*/
9
10
export {
11
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
11
+ __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
12
act,
13
Children,
14
Component,
packages/react/src/ReactClient.js
+1
-1
@@ -106,7 +106,7 @@ export {
106
cloneElement,
107
isValidElement,
108
ReactVersion as version,
109
- ReactSharedInternals as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
109
+ ReactSharedInternals as __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
110
// Concurrent Mode
111
useTransition,
112
startTransition,
packages/react/src/ReactServer.experimental.js
+1
-1
@@ -10,7 +10,7 @@
10
// Patch fetch
11
import './ReactFetch';
12
13
-export {default as __SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './ReactSharedInternalsServer';
13
+export {default as __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './ReactSharedInternalsServer';
14
15
import {forEach, map, count, toArray, only} from './ReactChildren';
16
import {
packages/react/src/ReactServer.js
+1
-1
@@ -10,7 +10,7 @@
10
// Patch fetch
11
import './ReactFetch';
12
13
-export {default as __SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED} from './ReactSharedInternalsServer';
13
+export {default as __SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE} from './ReactSharedInternalsServer';
14
15
import {forEach, map, count, toArray, only} from './ReactChildren';
16
import {
packages/scheduler/npm/umd/scheduler.development.js
+25
-19
@@ -20,91 +20,91 @@
20
: (global.Scheduler = factory(global));
21
})(this, function (global) {
22
function unstable_now() {
23
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
23
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_now.apply(
24
this,
25
arguments
26
);
27
}
28
29
function unstable_scheduleCallback() {
30
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
30
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_scheduleCallback.apply(
31
this,
32
arguments
33
);
34
}
35
36
function unstable_cancelCallback() {
37
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
37
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_cancelCallback.apply(
38
this,
39
arguments
40
);
41
}
42
43
function unstable_shouldYield() {
44
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
44
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_shouldYield.apply(
45
this,
46
arguments
47
);
48
}
49
50
function unstable_requestPaint() {
51
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
51
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_requestPaint.apply(
52
this,
53
arguments
54
);
55
}
56
57
function unstable_runWithPriority() {
58
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
58
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply(
59
this,
60
arguments
61
);
62
}
63
64
function unstable_next() {
65
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
65
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_next.apply(
66
this,
67
arguments
68
);
69
}
70
71
function unstable_wrapCallback() {
72
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
72
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_wrapCallback.apply(
73
this,
74
arguments
75
);
76
}
77
78
function unstable_getCurrentPriorityLevel() {
79
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
79
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getCurrentPriorityLevel.apply(
80
this,
81
arguments
82
);
83
}
84
85
function unstable_getFirstCallbackNode() {
86
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
86
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getFirstCallbackNode.apply(
87
this,
88
arguments
89
);
90
}
91
92
function unstable_pauseExecution() {
93
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_pauseExecution.apply(
93
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_pauseExecution.apply(
94
this,
95
arguments
96
);
97
}
98
99
function unstable_continueExecution() {
100
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_continueExecution.apply(
100
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_continueExecution.apply(
101
this,
102
arguments
103
);
104
}
105
106
function unstable_forceFrameRate() {
107
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
107
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_forceFrameRate.apply(
108
this,
109
arguments
110
);
@@ -125,27 +125,33 @@
125
unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
126
unstable_forceFrameRate: unstable_forceFrameRate,
127
get unstable_IdlePriority() {
128
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
128
+ return global.React
129
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
130
.Scheduler.unstable_IdlePriority;
131
},
132
get unstable_ImmediatePriority() {
132
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
133
+ return global.React
134
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
135
.Scheduler.unstable_ImmediatePriority;
136
},
137
get unstable_LowPriority() {
136
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
138
+ return global.React
139
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
140
.Scheduler.unstable_LowPriority;
141
},
142
get unstable_NormalPriority() {
140
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
143
+ return global.React
144
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
145
.Scheduler.unstable_NormalPriority;
146
},
147
get unstable_UserBlockingPriority() {
144
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
148
+ return global.React
149
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
150
.Scheduler.unstable_UserBlockingPriority;
151
},
152
get unstable_Profiling() {
148
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
153
+ return global.React
154
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
155
.Scheduler.unstable_Profiling;
156
},
157
});
packages/scheduler/npm/umd/scheduler.production.min.js
+23
-17
@@ -20,70 +20,70 @@
20
: (global.Scheduler = factory(global));
21
})(this, function (global) {
22
function unstable_now() {
23
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
23
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_now.apply(
24
this,
25
arguments
26
);
27
}
28
29
function unstable_scheduleCallback() {
30
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
30
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_scheduleCallback.apply(
31
this,
32
arguments
33
);
34
}
35
36
function unstable_cancelCallback() {
37
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
37
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_cancelCallback.apply(
38
this,
39
arguments
40
);
41
}
42
43
function unstable_shouldYield() {
44
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
44
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_shouldYield.apply(
45
this,
46
arguments
47
);
48
}
49
50
function unstable_requestPaint() {
51
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
51
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_requestPaint.apply(
52
this,
53
arguments
54
);
55
}
56
57
function unstable_runWithPriority() {
58
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
58
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply(
59
this,
60
arguments
61
);
62
}
63
64
function unstable_next() {
65
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
65
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_next.apply(
66
this,
67
arguments
68
);
69
}
70
71
function unstable_wrapCallback() {
72
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
72
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_wrapCallback.apply(
73
this,
74
arguments
75
);
76
}
77
78
function unstable_getCurrentPriorityLevel() {
79
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
79
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getCurrentPriorityLevel.apply(
80
this,
81
arguments
82
);
83
}
84
85
function unstable_getFirstCallbackNode() {
86
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
86
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getFirstCallbackNode.apply(
87
this,
88
arguments
89
);
@@ -98,7 +98,7 @@
98
}
99
100
function unstable_forceFrameRate() {
101
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
101
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_forceFrameRate.apply(
102
this,
103
arguments
104
);
@@ -119,27 +119,33 @@
119
unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
120
unstable_forceFrameRate: unstable_forceFrameRate,
121
get unstable_IdlePriority() {
122
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
122
+ return global.React
123
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
124
.Scheduler.unstable_IdlePriority;
125
},
126
get unstable_ImmediatePriority() {
126
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
127
+ return global.React
128
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
129
.Scheduler.unstable_ImmediatePriority;
130
},
131
get unstable_LowPriority() {
130
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
132
+ return global.React
133
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
134
.Scheduler.unstable_LowPriority;
135
},
136
get unstable_NormalPriority() {
134
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
137
+ return global.React
138
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
139
.Scheduler.unstable_NormalPriority;
140
},
141
get unstable_UserBlockingPriority() {
138
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
142
+ return global.React
143
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
144
.Scheduler.unstable_UserBlockingPriority;
145
},
146
get unstable_Profiling() {
142
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
147
+ return global.React
148
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
149
.Scheduler.unstable_Profiling;
150
},
151
});
packages/scheduler/npm/umd/scheduler.profiling.min.js
+23
-17
@@ -20,70 +20,70 @@
20
: (global.Scheduler = factory(global));
21
})(this, function (global) {
22
function unstable_now() {
23
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
23
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_now.apply(
24
this,
25
arguments
26
);
27
}
28
29
function unstable_scheduleCallback() {
30
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
30
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_scheduleCallback.apply(
31
this,
32
arguments
33
);
34
}
35
36
function unstable_cancelCallback() {
37
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
37
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_cancelCallback.apply(
38
this,
39
arguments
40
);
41
}
42
43
function unstable_shouldYield() {
44
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
44
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_shouldYield.apply(
45
this,
46
arguments
47
);
48
}
49
50
function unstable_requestPaint() {
51
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
51
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_requestPaint.apply(
52
this,
53
arguments
54
);
55
}
56
57
function unstable_runWithPriority() {
58
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
58
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply(
59
this,
60
arguments
61
);
62
}
63
64
function unstable_next() {
65
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
65
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_next.apply(
66
this,
67
arguments
68
);
69
}
70
71
function unstable_wrapCallback() {
72
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
72
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_wrapCallback.apply(
73
this,
74
arguments
75
);
76
}
77
78
function unstable_getCurrentPriorityLevel() {
79
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
79
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getCurrentPriorityLevel.apply(
80
this,
81
arguments
82
);
83
}
84
85
function unstable_getFirstCallbackNode() {
86
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
86
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_getFirstCallbackNode.apply(
87
this,
88
arguments
89
);
@@ -98,7 +98,7 @@
98
}
99
100
function unstable_forceFrameRate() {
101
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
101
+ return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_forceFrameRate.apply(
102
this,
103
arguments
104
);
@@ -119,27 +119,33 @@
119
unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
120
unstable_forceFrameRate: unstable_forceFrameRate,
121
get unstable_IdlePriority() {
122
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
122
+ return global.React
123
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
124
.Scheduler.unstable_IdlePriority;
125
},
126
get unstable_ImmediatePriority() {
126
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
127
+ return global.React
128
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
129
.Scheduler.unstable_ImmediatePriority;
130
},
131
get unstable_LowPriority() {
130
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
132
+ return global.React
133
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
134
.Scheduler.unstable_LowPriority;
135
},
136
get unstable_NormalPriority() {
134
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
137
+ return global.React
138
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
139
.Scheduler.unstable_NormalPriority;
140
},
141
get unstable_UserBlockingPriority() {
138
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
142
+ return global.React
143
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
144
.Scheduler.unstable_UserBlockingPriority;
145
},
146
get unstable_Profiling() {
142
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
147
+ return global.React
148
+ .__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
149
.Scheduler.unstable_Profiling;
150
},
151
});
packages/shared/ReactDOMSharedInternals.js
+1
-1
@@ -10,6 +10,6 @@
10
import * as ReactDOM from 'react-dom';
11
12
const ReactDOMSharedInternals =
13
- ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
13
+ ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
14
15
export default ReactDOMSharedInternals;
packages/shared/ReactSharedInternals.js
+1
-1
@@ -10,6 +10,6 @@
10
import * as React from 'react';
11
12
const ReactSharedInternals =
13
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
13
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
14
15
export default ReactSharedInternals;
packages/shared/forks/Scheduler.umd.js
+2
-1
@@ -9,7 +9,8 @@
9
10
import * as React from 'react';
11
12
-const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
12
+const ReactInternals =
13
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
14
15
const {
16
unstable_cancelCallback,
packages/shared/forks/consoleWithStackDev.www.js
+1
-1
@@ -35,7 +35,7 @@ function printWarning(level, format, args) {
35
if (__DEV__) {
36
const React = require('react');
37
const ReactSharedInternals =
38
- React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
38
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
39
// Defensive in case this is fired before React is initialized.
40
if (ReactSharedInternals != null) {
41
const stack = ReactSharedInternals.getStackAddendum();
scripts/rollup/shims/facebook-www/ReactBrowserEventEmitter_DO_NOT_USE.js
+2
-2
@@ -8,8 +8,8 @@
8
'use strict';
9
10
const {
11
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
11
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
12
} = require('ReactDOM');
13
14
module.exports =
15
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactBrowserEventEmitter;
15
+ __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.ReactBrowserEventEmitter;