react-reconciler 0.22.2 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-info.json +5 -5
- package/cjs/react-reconciler-persistent.development.js +2908 -3942
- package/cjs/react-reconciler-persistent.production.min.js +174 -173
- package/cjs/react-reconciler-reflection.development.js +80 -218
- package/cjs/react-reconciler-reflection.production.min.js +7 -7
- package/cjs/react-reconciler.development.js +2925 -3956
- package/cjs/react-reconciler.production.min.js +174 -173
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v0.
|
|
1
|
+
/** @license React v0.25.1
|
|
2
2
|
* react-reconciler-reflection.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -15,69 +15,59 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
15
15
|
(function() {
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
19
|
-
|
|
20
18
|
var React = require('react');
|
|
21
19
|
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
20
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
|
|
21
|
+
// Current owner and dispatcher used to share the same ref,
|
|
22
|
+
// but PR #14548 split them out to better support the react-debug-tools package.
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
error.name = 'Invariant Violation';
|
|
31
|
-
return error;
|
|
24
|
+
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
|
|
25
|
+
ReactSharedInternals.ReactCurrentDispatcher = {
|
|
26
|
+
current: null
|
|
27
|
+
};
|
|
32
28
|
}
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* expecting.
|
|
40
|
-
*
|
|
41
|
-
* The invariant message will be stripped in production, but the invariant
|
|
42
|
-
* will remain to ensure logic does not differ in production.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Similar to invariant but only logs a warning if the condition is not met.
|
|
47
|
-
* This can be used to log issues in development environments in critical
|
|
48
|
-
* paths. Removing the logging code for production environments will keep the
|
|
49
|
-
* same logic and follow the same code paths.
|
|
50
|
-
*/
|
|
51
|
-
var warningWithoutStack = function () {};
|
|
30
|
+
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
|
|
31
|
+
ReactSharedInternals.ReactCurrentBatchConfig = {
|
|
32
|
+
suspense: null
|
|
33
|
+
};
|
|
34
|
+
}
|
|
52
35
|
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
for (var
|
|
56
|
-
args[
|
|
36
|
+
function error(format) {
|
|
37
|
+
{
|
|
38
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
39
|
+
args[_key2 - 1] = arguments[_key2];
|
|
57
40
|
}
|
|
58
41
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
printWarning('error', format, args);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
62
45
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
46
|
+
function printWarning(level, format, args) {
|
|
47
|
+
// When changing this logic, you might want to also
|
|
48
|
+
// update consoleWithStackDev.www.js as well.
|
|
49
|
+
{
|
|
50
|
+
var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
|
|
51
|
+
|
|
52
|
+
if (!hasExistingStack) {
|
|
53
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
54
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
if (stack !== '') {
|
|
57
|
+
format += '%s';
|
|
58
|
+
args = args.concat([stack]);
|
|
59
|
+
}
|
|
70
60
|
}
|
|
71
61
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
77
|
-
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
62
|
+
var argsWithFormat = args.map(function (item) {
|
|
63
|
+
return '' + item;
|
|
64
|
+
}); // Careful: RN currently depends on this prefix
|
|
78
65
|
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
67
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
68
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
69
|
+
|
|
70
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
81
71
|
|
|
82
72
|
try {
|
|
83
73
|
// --- Welcome to debugging React ---
|
|
@@ -89,11 +79,9 @@ var warningWithoutStack = function () {};
|
|
|
89
79
|
});
|
|
90
80
|
throw new Error(message);
|
|
91
81
|
} catch (x) {}
|
|
92
|
-
}
|
|
82
|
+
}
|
|
93
83
|
}
|
|
94
84
|
|
|
95
|
-
var warningWithoutStack$1 = warningWithoutStack;
|
|
96
|
-
|
|
97
85
|
/**
|
|
98
86
|
* `ReactInstanceMap` maintains a mapping from a public facing stateful
|
|
99
87
|
* instance (key) and the internal representation (value). This allows public
|
|
@@ -103,59 +91,27 @@ var warningWithoutStack$1 = warningWithoutStack;
|
|
|
103
91
|
* Note that this module is currently shared and assumed to be stateless.
|
|
104
92
|
* If this becomes an actual Map, that will break.
|
|
105
93
|
*/
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* This API should be called `delete` but we'd have to make sure to always
|
|
109
|
-
* transform these to strings for IE support. When this transform is fully
|
|
110
|
-
* supported we can rename it.
|
|
111
|
-
*/
|
|
112
|
-
|
|
113
94
|
function get(key) {
|
|
114
95
|
return key._reactInternalFiber;
|
|
115
96
|
}
|
|
116
97
|
|
|
117
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
|
|
118
|
-
// Current owner and dispatcher used to share the same ref,
|
|
119
|
-
// but PR #14548 split them out to better support the react-debug-tools package.
|
|
120
|
-
|
|
121
|
-
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
|
|
122
|
-
ReactSharedInternals.ReactCurrentDispatcher = {
|
|
123
|
-
current: null
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
|
|
128
|
-
ReactSharedInternals.ReactCurrentBatchConfig = {
|
|
129
|
-
suspense: null
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
98
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
134
99
|
// nor polyfill, then a plain number is used for performance.
|
|
135
100
|
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
136
|
-
|
|
137
101
|
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
138
102
|
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
139
103
|
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
140
104
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
141
105
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
142
106
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
143
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
107
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
148
108
|
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
149
109
|
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
150
110
|
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
151
111
|
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
152
|
-
|
|
153
|
-
{
|
|
154
|
-
|
|
155
|
-
}
|
|
112
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
156
113
|
|
|
157
114
|
var Resolved = 1;
|
|
158
|
-
|
|
159
115
|
function refineResolvedLazyComponent(lazyComponent) {
|
|
160
116
|
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
|
161
117
|
}
|
|
@@ -173,7 +129,7 @@ function getComponentName(type) {
|
|
|
173
129
|
|
|
174
130
|
{
|
|
175
131
|
if (typeof type.tag === 'number') {
|
|
176
|
-
|
|
132
|
+
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
177
133
|
}
|
|
178
134
|
}
|
|
179
135
|
|
|
@@ -219,6 +175,9 @@ function getComponentName(type) {
|
|
|
219
175
|
case REACT_MEMO_TYPE:
|
|
220
176
|
return getComponentName(type.type);
|
|
221
177
|
|
|
178
|
+
case REACT_BLOCK_TYPE:
|
|
179
|
+
return getComponentName(type.render);
|
|
180
|
+
|
|
222
181
|
case REACT_LAZY_TYPE:
|
|
223
182
|
{
|
|
224
183
|
var thenable = type;
|
|
@@ -237,7 +196,6 @@ function getComponentName(type) {
|
|
|
237
196
|
}
|
|
238
197
|
|
|
239
198
|
var ClassComponent = 1;
|
|
240
|
-
// Before we know whether it is function or class
|
|
241
199
|
|
|
242
200
|
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
|
243
201
|
|
|
@@ -245,110 +203,22 @@ var HostPortal = 4; // A subtree. Could be an entry point to a different rendere
|
|
|
245
203
|
|
|
246
204
|
var HostComponent = 5;
|
|
247
205
|
var HostText = 6;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
206
|
var SuspenseComponent = 13;
|
|
255
207
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
var FundamentalComponent = 20;
|
|
262
|
-
|
|
263
208
|
// Don't change these two values. They're used by React Dev Tools.
|
|
264
209
|
var NoEffect =
|
|
265
210
|
/* */
|
|
266
211
|
0;
|
|
267
|
-
// You can change the rest (and add more).
|
|
268
212
|
|
|
269
213
|
var Placement =
|
|
270
214
|
/* */
|
|
271
215
|
2;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
216
|
var Hydrating =
|
|
282
217
|
/* */
|
|
283
218
|
1024;
|
|
284
|
-
// Passive & Update & Callback & Ref & Snapshot
|
|
285
|
-
|
|
286
|
-
// Union of all host effects
|
|
287
|
-
|
|
288
|
-
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
289
|
-
|
|
290
|
-
// In some cases, StrictMode should also double-render lifecycles.
|
|
291
|
-
// This can be confusing for tests though,
|
|
292
|
-
// And it can be bad for performance in production.
|
|
293
|
-
// This feature flag can be used to control the behavior:
|
|
294
|
-
|
|
295
|
-
// To preserve the "Pause on caught exceptions" behavior of the debugger, we
|
|
296
|
-
// replay the begin phase of a failed component inside invokeGuardedCallback.
|
|
297
|
-
|
|
298
|
-
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
|
299
|
-
|
|
300
|
-
// Gather advanced timing metrics for Profiler subtrees.
|
|
301
|
-
|
|
302
|
-
// Trace which interactions trigger each commit.
|
|
303
|
-
|
|
304
|
-
// Only used in www builds.
|
|
305
|
-
|
|
306
|
-
// TODO: true? Here it might just be false.
|
|
307
|
-
|
|
308
|
-
// Only used in www builds.
|
|
309
|
-
|
|
310
|
-
// Only used in www builds.
|
|
311
|
-
|
|
312
|
-
// Disable javascript: URL strings in href for XSS protection.
|
|
313
|
-
|
|
314
|
-
// React Fire: prevent the value and checked attributes from syncing
|
|
315
|
-
// with their related DOM properties
|
|
316
|
-
|
|
317
|
-
// These APIs will no longer be "unstable" in the upcoming 16.7 release,
|
|
318
|
-
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
|
|
322
|
-
// This is a flag so we can fix warnings in RN core before turning it on
|
|
323
|
-
|
|
324
|
-
// Experimental React Flare event system and event components support.
|
|
325
|
-
|
|
326
|
-
// Experimental Host Component support.
|
|
327
219
|
|
|
328
220
|
var enableFundamentalAPI = false; // Experimental Scope support.
|
|
329
221
|
|
|
330
|
-
// New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
|
|
331
|
-
|
|
332
|
-
// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
|
|
333
|
-
// Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
|
|
334
|
-
|
|
335
|
-
// For tests, we flush suspense fallbacks in an act scope;
|
|
336
|
-
// *except* in some of our own tests, where we test incremental loading states.
|
|
337
|
-
|
|
338
|
-
// Changes priority of some events like mousemove to user-blocking priority,
|
|
339
|
-
// but without making them discrete. The flag exists in case it causes
|
|
340
|
-
// starvation problems.
|
|
341
|
-
|
|
342
|
-
// Add a callback property to suspense to notify which promises are currently
|
|
343
|
-
// in the update queue. This allows reporting and tracing of what is causing
|
|
344
|
-
// the user to see a loading state.
|
|
345
|
-
// Also allows hydration callbacks to fire when a dehydrated boundary gets
|
|
346
|
-
// hydrated or deleted.
|
|
347
|
-
|
|
348
|
-
// Part of the simplification of React.createElement so we can eventually move
|
|
349
|
-
// from React.createElement to React.jsx
|
|
350
|
-
// https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
|
|
351
|
-
|
|
352
222
|
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
353
223
|
function getNearestMountedFiber(fiber) {
|
|
354
224
|
var node = fiber;
|
|
@@ -419,7 +289,11 @@ function isMounted(component) {
|
|
|
419
289
|
if (owner !== null && owner.tag === ClassComponent) {
|
|
420
290
|
var ownerFiber = owner;
|
|
421
291
|
var instance = ownerFiber.stateNode;
|
|
422
|
-
|
|
292
|
+
|
|
293
|
+
if (!instance._warnedAboutRefsInRender) {
|
|
294
|
+
error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
|
|
295
|
+
}
|
|
296
|
+
|
|
423
297
|
instance._warnedAboutRefsInRender = true;
|
|
424
298
|
}
|
|
425
299
|
}
|
|
@@ -434,13 +308,11 @@ function isMounted(component) {
|
|
|
434
308
|
}
|
|
435
309
|
|
|
436
310
|
function assertIsMounted(fiber) {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
441
|
-
}
|
|
311
|
+
if (!(getNearestMountedFiber(fiber) === fiber)) {
|
|
312
|
+
{
|
|
313
|
+
throw Error( "Unable to find node on an unmounted component." );
|
|
442
314
|
}
|
|
443
|
-
}
|
|
315
|
+
}
|
|
444
316
|
}
|
|
445
317
|
|
|
446
318
|
function findCurrentFiberUsingSlowPath(fiber) {
|
|
@@ -450,13 +322,11 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
450
322
|
// If there is no alternate, then we only need to check if it is mounted.
|
|
451
323
|
var nearestMounted = getNearestMountedFiber(fiber);
|
|
452
324
|
|
|
453
|
-
(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
457
|
-
}
|
|
325
|
+
if (!(nearestMounted !== null)) {
|
|
326
|
+
{
|
|
327
|
+
throw Error( "Unable to find node on an unmounted component." );
|
|
458
328
|
}
|
|
459
|
-
}
|
|
329
|
+
}
|
|
460
330
|
|
|
461
331
|
if (nearestMounted !== fiber) {
|
|
462
332
|
return null;
|
|
@@ -521,13 +391,11 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
521
391
|
// way this could possibly happen is if this was unmounted, if at all.
|
|
522
392
|
|
|
523
393
|
|
|
524
|
-
|
|
394
|
+
{
|
|
525
395
|
{
|
|
526
|
-
|
|
527
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
528
|
-
}
|
|
396
|
+
throw Error( "Unable to find node on an unmounted component." );
|
|
529
397
|
}
|
|
530
|
-
}
|
|
398
|
+
}
|
|
531
399
|
}
|
|
532
400
|
|
|
533
401
|
if (a.return !== b.return) {
|
|
@@ -586,34 +454,28 @@ function findCurrentFiberUsingSlowPath(fiber) {
|
|
|
586
454
|
_child = _child.sibling;
|
|
587
455
|
}
|
|
588
456
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
throw ReactError(Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."));
|
|
593
|
-
}
|
|
457
|
+
if (!didFindChild) {
|
|
458
|
+
{
|
|
459
|
+
throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
|
|
594
460
|
}
|
|
595
|
-
}
|
|
461
|
+
}
|
|
596
462
|
}
|
|
597
463
|
}
|
|
598
464
|
|
|
599
|
-
(
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
throw ReactError(Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."));
|
|
603
|
-
}
|
|
465
|
+
if (!(a.alternate === b)) {
|
|
466
|
+
{
|
|
467
|
+
throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
|
|
604
468
|
}
|
|
605
|
-
}
|
|
469
|
+
}
|
|
606
470
|
} // If the root is not a host container, we're in a disconnected tree. I.e.
|
|
607
471
|
// unmounted.
|
|
608
472
|
|
|
609
473
|
|
|
610
|
-
(
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
throw ReactError(Error("Unable to find node on an unmounted component."));
|
|
614
|
-
}
|
|
474
|
+
if (!(a.tag === HostRoot)) {
|
|
475
|
+
{
|
|
476
|
+
throw Error( "Unable to find node on an unmounted component." );
|
|
615
477
|
}
|
|
616
|
-
}
|
|
478
|
+
}
|
|
617
479
|
|
|
618
480
|
if (a.stateNode.current === a) {
|
|
619
481
|
// We've determined that A is the current branch.
|
|
@@ -673,7 +535,7 @@ function findCurrentHostFiberWithNoPortals(parent) {
|
|
|
673
535
|
var node = currentParent;
|
|
674
536
|
|
|
675
537
|
while (true) {
|
|
676
|
-
if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI
|
|
538
|
+
if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
|
|
677
539
|
return node;
|
|
678
540
|
} else if (node.child && node.tag !== HostPortal) {
|
|
679
541
|
node.child.return = node;
|
|
@@ -702,13 +564,13 @@ function findCurrentHostFiberWithNoPortals(parent) {
|
|
|
702
564
|
return null;
|
|
703
565
|
}
|
|
704
566
|
|
|
567
|
+
exports.findCurrentFiberUsingSlowPath = findCurrentFiberUsingSlowPath;
|
|
568
|
+
exports.findCurrentHostFiber = findCurrentHostFiber;
|
|
569
|
+
exports.findCurrentHostFiberWithNoPortals = findCurrentHostFiberWithNoPortals;
|
|
570
|
+
exports.getContainerFromFiber = getContainerFromFiber;
|
|
705
571
|
exports.getNearestMountedFiber = getNearestMountedFiber;
|
|
706
572
|
exports.getSuspenseInstanceFromFiber = getSuspenseInstanceFromFiber;
|
|
707
|
-
exports.getContainerFromFiber = getContainerFromFiber;
|
|
708
573
|
exports.isFiberMounted = isFiberMounted;
|
|
709
574
|
exports.isMounted = isMounted;
|
|
710
|
-
exports.findCurrentFiberUsingSlowPath = findCurrentFiberUsingSlowPath;
|
|
711
|
-
exports.findCurrentHostFiber = findCurrentHostFiber;
|
|
712
|
-
exports.findCurrentHostFiberWithNoPortals = findCurrentHostFiberWithNoPortals;
|
|
713
575
|
})();
|
|
714
576
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v0.
|
|
1
|
+
/** @license React v0.25.1
|
|
2
2
|
* react-reconciler-reflection.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';
|
|
11
|
-
l.hasOwnProperty("
|
|
12
|
-
function p(b){var a=b.alternate;if(!a){a=m(b);if(null===a)throw h(
|
|
13
|
-
c){k=!0;c=e
|
|
14
|
-
exports.getContainerFromFiber=function(b){return 3===b.tag?b.stateNode.containerInfo:null};exports.isFiberMounted=function(b){return m(b)===b};exports.isMounted=function(b){return(b=b._reactInternalFiber)?m(b)===b:!1};exports.findCurrentFiberUsingSlowPath=p;
|
|
10
|
+
'use strict';function h(b){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+b,c=1;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+b+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=require("react").__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;l.hasOwnProperty("ReactCurrentDispatcher")||(l.ReactCurrentDispatcher={current:null});
|
|
11
|
+
l.hasOwnProperty("ReactCurrentBatchConfig")||(l.ReactCurrentBatchConfig={suspense:null});function m(b){var a=b,c=b;if(b.alternate)for(;a.return;)a=a.return;else{b=a;do a=b,0!==(a.effectTag&1026)&&(c=a.return),b=a.return;while(b)}return 3===a.tag?c:null}function n(b){if(m(b)!==b)throw Error(h(188));}
|
|
12
|
+
function p(b){var a=b.alternate;if(!a){a=m(b);if(null===a)throw Error(h(188));return a!==b?null:b}for(var c=b,e=a;;){var f=c.return;if(null===f)break;var d=f.alternate;if(null===d){e=f.return;if(null!==e){c=e;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===c)return n(f),b;if(d===e)return n(f),a;d=d.sibling}throw Error(h(188));}if(c.return!==e.return)c=f,e=d;else{for(var k=!1,g=f.child;g;){if(g===c){k=!0;c=f;e=d;break}if(g===e){k=!0;e=f;c=d;break}g=g.sibling}if(!k){for(g=d.child;g;){if(g===
|
|
13
|
+
c){k=!0;c=d;e=f;break}if(g===e){k=!0;e=d;c=f;break}g=g.sibling}if(!k)throw Error(h(189));}}if(c.alternate!==e)throw Error(h(190));}if(3!==c.tag)throw Error(h(188));return c.stateNode.current===c?b:a}exports.findCurrentFiberUsingSlowPath=p;
|
|
15
14
|
exports.findCurrentHostFiber=function(b){b=p(b);if(!b)return null;for(var a=b;;){if(5===a.tag||6===a.tag)return a;if(a.child)a.child.return=a,a=a.child;else{if(a===b)break;for(;!a.sibling;){if(!a.return||a.return===b)return null;a=a.return}a.sibling.return=a.return;a=a.sibling}}return null};
|
|
16
|
-
exports.findCurrentHostFiberWithNoPortals=function(b){b=p(b);if(!b)return null;for(var a=b;;){if(5===a.tag||6===a.tag)return a;if(a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===b)break;for(;!a.sibling;){if(!a.return||a.return===b)return null;a=a.return}a.sibling.return=a.return;a=a.sibling}}return null};
|
|
15
|
+
exports.findCurrentHostFiberWithNoPortals=function(b){b=p(b);if(!b)return null;for(var a=b;;){if(5===a.tag||6===a.tag)return a;if(a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===b)break;for(;!a.sibling;){if(!a.return||a.return===b)return null;a=a.return}a.sibling.return=a.return;a=a.sibling}}return null};exports.getContainerFromFiber=function(b){return 3===b.tag?b.stateNode.containerInfo:null};exports.getNearestMountedFiber=m;
|
|
16
|
+
exports.getSuspenseInstanceFromFiber=function(b){if(13===b.tag){var a=b.memoizedState;null===a&&(b=b.alternate,null!==b&&(a=b.memoizedState));if(null!==a)return a.dehydrated}return null};exports.isFiberMounted=function(b){return m(b)===b};exports.isMounted=function(b){return(b=b._reactInternalFiber)?m(b)===b:!1};
|