react-test-renderer 15.5.0 → 15.5.4
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/lib/ReactShallowRenderer.js +6 -0
- package/lib/shallow/ARIADOMPropertyConfig.js +73 -0
- package/lib/shallow/AutoFocusUtils.js +23 -0
- package/lib/shallow/BeforeInputEventPlugin.js +384 -0
- package/lib/shallow/CSSProperty.js +147 -0
- package/lib/shallow/CSSPropertyOperations.js +208 -0
- package/lib/shallow/CallbackQueue.js +118 -0
- package/lib/shallow/ChangeEventPlugin.js +345 -0
- package/lib/shallow/DOMChildrenOperations.js +224 -0
- package/lib/shallow/DOMLazyTree.js +117 -0
- package/lib/shallow/DOMNamespaces.js +19 -0
- package/lib/shallow/DOMProperty.js +209 -0
- package/lib/shallow/DOMPropertyOperations.js +236 -0
- package/lib/shallow/Danger.js +47 -0
- package/lib/shallow/DefaultEventPluginOrder.js +25 -0
- package/lib/shallow/EnterLeaveEventPlugin.js +99 -0
- package/lib/shallow/EventConstants.js +91 -0
- package/lib/shallow/EventPluginHub.js +277 -0
- package/lib/shallow/EventPluginRegistry.js +254 -0
- package/lib/shallow/EventPluginUtils.js +225 -0
- package/lib/shallow/EventPropagators.js +133 -0
- package/lib/shallow/FallbackCompositionState.js +94 -0
- package/lib/shallow/HTMLDOMPropertyConfig.js +235 -0
- package/lib/shallow/KeyEscapeUtils.js +58 -0
- package/lib/shallow/LinkedValueUtils.js +137 -0
- package/lib/shallow/PluginModuleType.js +12 -0
- package/lib/shallow/PooledClass.js +111 -0
- package/lib/shallow/ReactBrowserEventEmitter.js +327 -0
- package/lib/shallow/ReactChildFiber.js +243 -0
- package/lib/shallow/ReactChildReconciler.js +153 -0
- package/lib/shallow/ReactComponentBrowserEnvironment.js +29 -0
- package/lib/shallow/ReactComponentEnvironment.js +45 -0
- package/lib/shallow/ReactCompositeComponent.js +901 -0
- package/lib/shallow/ReactCoroutine.js +80 -0
- package/lib/shallow/ReactDOM.js +110 -0
- package/lib/shallow/ReactDOMComponent.js +1000 -0
- package/lib/shallow/ReactDOMComponentFlags.js +17 -0
- package/lib/shallow/ReactDOMComponentTree.js +194 -0
- package/lib/shallow/ReactDOMContainerInfo.js +32 -0
- package/lib/shallow/ReactDOMEmptyComponent.js +59 -0
- package/lib/shallow/ReactDOMFeatureFlags.js +18 -0
- package/lib/shallow/ReactDOMFiber.js +97 -0
- package/lib/shallow/ReactDOMIDOperations.js +33 -0
- package/lib/shallow/ReactDOMInput.js +284 -0
- package/lib/shallow/ReactDOMInvalidARIAHook.js +92 -0
- package/lib/shallow/ReactDOMNullInputValuePropHook.js +42 -0
- package/lib/shallow/ReactDOMOption.js +122 -0
- package/lib/shallow/ReactDOMSelect.js +199 -0
- package/lib/shallow/ReactDOMSelection.js +211 -0
- package/lib/shallow/ReactDOMServer.js +25 -0
- package/lib/shallow/ReactDOMTextComponent.js +163 -0
- package/lib/shallow/ReactDOMTextarea.js +159 -0
- package/lib/shallow/ReactDOMTreeTraversal.js +135 -0
- package/lib/shallow/ReactDOMUnknownPropertyHook.js +111 -0
- package/lib/shallow/ReactDebugTool.js +358 -0
- package/lib/shallow/ReactDefaultBatchingStrategy.js +67 -0
- package/lib/shallow/ReactDefaultInjection.js +85 -0
- package/lib/shallow/ReactElementSymbol.js +19 -0
- package/lib/shallow/ReactEmptyComponent.js +29 -0
- package/lib/shallow/ReactErrorUtils.js +75 -0
- package/lib/shallow/ReactEventEmitterMixin.js +32 -0
- package/lib/shallow/ReactEventListener.js +154 -0
- package/lib/shallow/ReactFeatureFlags.js +21 -0
- package/lib/shallow/ReactFiber.js +190 -0
- package/lib/shallow/ReactFiberBeginWork.js +380 -0
- package/lib/shallow/ReactFiberCommitWork.js +78 -0
- package/lib/shallow/ReactFiberCompleteWork.js +208 -0
- package/lib/shallow/ReactFiberReconciler.js +64 -0
- package/lib/shallow/ReactFiberRoot.js +29 -0
- package/lib/shallow/ReactFiberScheduler.js +331 -0
- package/lib/shallow/ReactFiberUpdateQueue.js +77 -0
- package/lib/shallow/ReactHostComponent.js +67 -0
- package/lib/shallow/ReactHostOperationHistoryHook.js +33 -0
- package/lib/shallow/ReactInjection.js +33 -0
- package/lib/shallow/ReactInputSelection.js +123 -0
- package/lib/shallow/ReactInstanceMap.js +47 -0
- package/lib/shallow/ReactInstanceType.js +12 -0
- package/lib/shallow/ReactInstrumentation.js +23 -0
- package/lib/shallow/ReactInvalidSetStateWarningHook.js +36 -0
- package/lib/shallow/ReactMarkupChecksum.js +49 -0
- package/lib/shallow/ReactMount.js +537 -0
- package/lib/shallow/ReactMultiChild.js +449 -0
- package/lib/shallow/ReactMultiChildUpdateTypes.js +18 -0
- package/lib/shallow/ReactNodeTypes.js +39 -0
- package/lib/shallow/ReactOwner.js +93 -0
- package/lib/shallow/ReactPerf.js +500 -0
- package/lib/shallow/ReactPriorityLevel.js +20 -0
- package/lib/shallow/ReactPropTypeLocationNames.js +24 -0
- package/lib/shallow/ReactPropTypeLocations.js +12 -0
- package/lib/shallow/ReactPropTypesSecret.js +16 -0
- package/lib/shallow/ReactReconcileTransaction.js +177 -0
- package/lib/shallow/ReactReconciler.js +167 -0
- package/lib/shallow/ReactRef.js +88 -0
- package/lib/shallow/ReactReifiedYield.js +30 -0
- package/lib/shallow/ReactServerBatchingStrategy.js +21 -0
- package/lib/shallow/ReactServerRendering.js +89 -0
- package/lib/shallow/ReactServerRenderingTransaction.js +89 -0
- package/lib/shallow/ReactServerUpdateQueue.js +138 -0
- package/lib/shallow/ReactShallowRenderer.js +150 -0
- package/lib/shallow/ReactSimpleEmptyComponent.js +36 -0
- package/lib/shallow/ReactSyntheticEventType.js +14 -0
- package/lib/shallow/ReactTestEmptyComponent.js +36 -0
- package/lib/shallow/ReactTestMount.js +131 -0
- package/lib/shallow/ReactTestReconcileTransaction.js +128 -0
- package/lib/shallow/ReactTestRenderer.js +139 -0
- package/lib/shallow/ReactTestTextComponent.js +40 -0
- package/lib/shallow/ReactTypeOfWork.js +23 -0
- package/lib/shallow/ReactTypes.js +12 -0
- package/lib/shallow/ReactUpdateQueue.js +235 -0
- package/lib/shallow/ReactUpdates.js +250 -0
- package/lib/shallow/ReactVersion.js +13 -0
- package/lib/shallow/ResponderEventPlugin.js +507 -0
- package/lib/shallow/ResponderSyntheticEvent.js +38 -0
- package/lib/shallow/ResponderTouchHistoryStore.js +183 -0
- package/lib/shallow/SVGDOMPropertyConfig.js +301 -0
- package/lib/shallow/SelectEventPlugin.js +190 -0
- package/lib/shallow/SimpleEventPlugin.js +227 -0
- package/lib/shallow/SyntheticAnimationEvent.js +38 -0
- package/lib/shallow/SyntheticClipboardEvent.js +37 -0
- package/lib/shallow/SyntheticCompositionEvent.js +35 -0
- package/lib/shallow/SyntheticDragEvent.js +35 -0
- package/lib/shallow/SyntheticEvent.js +267 -0
- package/lib/shallow/SyntheticFocusEvent.js +35 -0
- package/lib/shallow/SyntheticInputEvent.js +36 -0
- package/lib/shallow/SyntheticKeyboardEvent.js +83 -0
- package/lib/shallow/SyntheticMouseEvent.js +71 -0
- package/lib/shallow/SyntheticTouchEvent.js +44 -0
- package/lib/shallow/SyntheticTransitionEvent.js +38 -0
- package/lib/shallow/SyntheticUIEvent.js +58 -0
- package/lib/shallow/SyntheticWheelEvent.js +53 -0
- package/lib/shallow/TapEventPlugin.js +115 -0
- package/lib/shallow/TouchHistoryMath.js +98 -0
- package/lib/shallow/Transaction.js +224 -0
- package/lib/shallow/ViewportMetrics.js +26 -0
- package/lib/shallow/accumulate.js +45 -0
- package/lib/shallow/accumulateInto.js +57 -0
- package/lib/shallow/adler32.js +43 -0
- package/lib/shallow/canDefineProperty.js +25 -0
- package/lib/shallow/checkReactTypeSpec.js +86 -0
- package/lib/shallow/createMicrosoftUnsafeLocalFunction.js +31 -0
- package/lib/shallow/dangerousStyleValue.js +78 -0
- package/lib/shallow/deprecated.js +56 -0
- package/lib/shallow/escapeTextContentForBrowser.js +122 -0
- package/lib/shallow/findDOMNode.js +59 -0
- package/lib/shallow/flattenChildren.js +75 -0
- package/lib/shallow/forEachAccumulated.js +30 -0
- package/lib/shallow/getEventCharCode.js +49 -0
- package/lib/shallow/getEventKey.js +101 -0
- package/lib/shallow/getEventModifierState.js +42 -0
- package/lib/shallow/getEventTarget.js +34 -0
- package/lib/shallow/getHostComponentFromComposite.js +29 -0
- package/lib/shallow/getIteratorFn.js +40 -0
- package/lib/shallow/getNodeForCharacterOffset.js +73 -0
- package/lib/shallow/getTextContentAccessor.js +32 -0
- package/lib/shallow/getVendorPrefixedEventName.js +100 -0
- package/lib/shallow/instantiateReactComponent.js +128 -0
- package/lib/shallow/isEventSupported.js +59 -0
- package/lib/shallow/isTextInputElement.js +50 -0
- package/lib/shallow/quoteAttributeValueForBrowser.js +25 -0
- package/lib/shallow/reactProdInvariant.js +38 -0
- package/lib/shallow/renderSubtreeIntoContainer.js +15 -0
- package/lib/shallow/setInnerHTML.js +97 -0
- package/lib/shallow/setTextContent.js +51 -0
- package/lib/shallow/shouldUpdateReactComponent.js +41 -0
- package/lib/shallow/traverseAllChildren.js +175 -0
- package/lib/shallow/validateDOMNesting.js +376 -0
- package/package.json +1 -1
- package/shallow.js +1 -1
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
var _prodInvariant = require('./reactProdInvariant'),
|
|
14
|
+
_assign = require('object-assign');
|
|
15
|
+
|
|
16
|
+
var CallbackQueue = require('./CallbackQueue');
|
|
17
|
+
var PooledClass = require('./PooledClass');
|
|
18
|
+
var ReactFeatureFlags = require('./ReactFeatureFlags');
|
|
19
|
+
var ReactReconciler = require('./ReactReconciler');
|
|
20
|
+
var Transaction = require('./Transaction');
|
|
21
|
+
|
|
22
|
+
var invariant = require('fbjs/lib/invariant');
|
|
23
|
+
|
|
24
|
+
var dirtyComponents = [];
|
|
25
|
+
var updateBatchNumber = 0;
|
|
26
|
+
var asapCallbackQueue = CallbackQueue.getPooled();
|
|
27
|
+
var asapEnqueued = false;
|
|
28
|
+
|
|
29
|
+
var batchingStrategy = null;
|
|
30
|
+
|
|
31
|
+
function ensureInjected() {
|
|
32
|
+
!(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var NESTED_UPDATES = {
|
|
36
|
+
initialize: function () {
|
|
37
|
+
this.dirtyComponentsLength = dirtyComponents.length;
|
|
38
|
+
},
|
|
39
|
+
close: function () {
|
|
40
|
+
if (this.dirtyComponentsLength !== dirtyComponents.length) {
|
|
41
|
+
// Additional updates were enqueued by componentDidUpdate handlers or
|
|
42
|
+
// similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
|
|
43
|
+
// these new updates so that if A's componentDidUpdate calls setState on
|
|
44
|
+
// B, B will update before the callback A's updater provided when calling
|
|
45
|
+
// setState.
|
|
46
|
+
dirtyComponents.splice(0, this.dirtyComponentsLength);
|
|
47
|
+
flushBatchedUpdates();
|
|
48
|
+
} else {
|
|
49
|
+
dirtyComponents.length = 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var UPDATE_QUEUEING = {
|
|
55
|
+
initialize: function () {
|
|
56
|
+
this.callbackQueue.reset();
|
|
57
|
+
},
|
|
58
|
+
close: function () {
|
|
59
|
+
this.callbackQueue.notifyAll();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
|
|
64
|
+
|
|
65
|
+
function ReactUpdatesFlushTransaction() {
|
|
66
|
+
this.reinitializeTransaction();
|
|
67
|
+
this.dirtyComponentsLength = null;
|
|
68
|
+
this.callbackQueue = CallbackQueue.getPooled();
|
|
69
|
+
this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
|
70
|
+
/* useCreateElement */true);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
|
|
74
|
+
getTransactionWrappers: function () {
|
|
75
|
+
return TRANSACTION_WRAPPERS;
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
destructor: function () {
|
|
79
|
+
this.dirtyComponentsLength = null;
|
|
80
|
+
CallbackQueue.release(this.callbackQueue);
|
|
81
|
+
this.callbackQueue = null;
|
|
82
|
+
ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
|
|
83
|
+
this.reconcileTransaction = null;
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
perform: function (method, scope, a) {
|
|
87
|
+
// Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
|
|
88
|
+
// with this transaction's wrappers around it.
|
|
89
|
+
return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
|
|
94
|
+
|
|
95
|
+
function batchedUpdates(callback, a, b, c, d, e) {
|
|
96
|
+
ensureInjected();
|
|
97
|
+
return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Array comparator for ReactComponents by mount ordering.
|
|
102
|
+
*
|
|
103
|
+
* @param {ReactComponent} c1 first component you're comparing
|
|
104
|
+
* @param {ReactComponent} c2 second component you're comparing
|
|
105
|
+
* @return {number} Return value usable by Array.prototype.sort().
|
|
106
|
+
*/
|
|
107
|
+
function mountOrderComparator(c1, c2) {
|
|
108
|
+
return c1._mountOrder - c2._mountOrder;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function runBatchedUpdates(transaction) {
|
|
112
|
+
var len = transaction.dirtyComponentsLength;
|
|
113
|
+
!(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
|
|
114
|
+
|
|
115
|
+
// Since reconciling a component higher in the owner hierarchy usually (not
|
|
116
|
+
// always -- see shouldComponentUpdate()) will reconcile children, reconcile
|
|
117
|
+
// them before their children by sorting the array.
|
|
118
|
+
dirtyComponents.sort(mountOrderComparator);
|
|
119
|
+
|
|
120
|
+
// Any updates enqueued while reconciling must be performed after this entire
|
|
121
|
+
// batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
|
|
122
|
+
// C, B could update twice in a single batch if C's render enqueues an update
|
|
123
|
+
// to B (since B would have already updated, we should skip it, and the only
|
|
124
|
+
// way we can know to do so is by checking the batch counter).
|
|
125
|
+
updateBatchNumber++;
|
|
126
|
+
|
|
127
|
+
for (var i = 0; i < len; i++) {
|
|
128
|
+
// If a component is unmounted before pending changes apply, it will still
|
|
129
|
+
// be here, but we assume that it has cleared its _pendingCallbacks and
|
|
130
|
+
// that performUpdateIfNecessary is a noop.
|
|
131
|
+
var component = dirtyComponents[i];
|
|
132
|
+
|
|
133
|
+
// If performUpdateIfNecessary happens to enqueue any new updates, we
|
|
134
|
+
// shouldn't execute the callbacks until the next render happens, so
|
|
135
|
+
// stash the callbacks first
|
|
136
|
+
var callbacks = component._pendingCallbacks;
|
|
137
|
+
component._pendingCallbacks = null;
|
|
138
|
+
|
|
139
|
+
var markerName;
|
|
140
|
+
if (ReactFeatureFlags.logTopLevelRenders) {
|
|
141
|
+
var namedComponent = component;
|
|
142
|
+
// Duck type TopLevelWrapper. This is probably always true.
|
|
143
|
+
if (component._currentElement.type.isReactTopLevelWrapper) {
|
|
144
|
+
namedComponent = component._renderedComponent;
|
|
145
|
+
}
|
|
146
|
+
markerName = 'React update: ' + namedComponent.getName();
|
|
147
|
+
console.time(markerName);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
|
|
151
|
+
|
|
152
|
+
if (markerName) {
|
|
153
|
+
console.timeEnd(markerName);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (callbacks) {
|
|
157
|
+
for (var j = 0; j < callbacks.length; j++) {
|
|
158
|
+
transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
var flushBatchedUpdates = function () {
|
|
165
|
+
// ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
|
|
166
|
+
// array and perform any updates enqueued by mount-ready handlers (i.e.,
|
|
167
|
+
// componentDidUpdate) but we need to check here too in order to catch
|
|
168
|
+
// updates enqueued by setState callbacks and asap calls.
|
|
169
|
+
while (dirtyComponents.length || asapEnqueued) {
|
|
170
|
+
if (dirtyComponents.length) {
|
|
171
|
+
var transaction = ReactUpdatesFlushTransaction.getPooled();
|
|
172
|
+
transaction.perform(runBatchedUpdates, null, transaction);
|
|
173
|
+
ReactUpdatesFlushTransaction.release(transaction);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (asapEnqueued) {
|
|
177
|
+
asapEnqueued = false;
|
|
178
|
+
var queue = asapCallbackQueue;
|
|
179
|
+
asapCallbackQueue = CallbackQueue.getPooled();
|
|
180
|
+
queue.notifyAll();
|
|
181
|
+
CallbackQueue.release(queue);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Mark a component as needing a rerender, adding an optional callback to a
|
|
188
|
+
* list of functions which will be executed once the rerender occurs.
|
|
189
|
+
*/
|
|
190
|
+
function enqueueUpdate(component) {
|
|
191
|
+
ensureInjected();
|
|
192
|
+
|
|
193
|
+
// Various parts of our code (such as ReactCompositeComponent's
|
|
194
|
+
// _renderValidatedComponent) assume that calls to render aren't nested;
|
|
195
|
+
// verify that that's the case. (This is called by each top-level update
|
|
196
|
+
// function, like setState, forceUpdate, etc.; creation and
|
|
197
|
+
// destruction of top-level components is guarded in ReactMount.)
|
|
198
|
+
|
|
199
|
+
if (!batchingStrategy.isBatchingUpdates) {
|
|
200
|
+
batchingStrategy.batchedUpdates(enqueueUpdate, component);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
dirtyComponents.push(component);
|
|
205
|
+
if (component._updateBatchNumber == null) {
|
|
206
|
+
component._updateBatchNumber = updateBatchNumber + 1;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Enqueue a callback to be run at the end of the current batching cycle. Throws
|
|
212
|
+
* if no updates are currently being performed.
|
|
213
|
+
*/
|
|
214
|
+
function asap(callback, context) {
|
|
215
|
+
!batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
|
|
216
|
+
asapCallbackQueue.enqueue(callback, context);
|
|
217
|
+
asapEnqueued = true;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
var ReactUpdatesInjection = {
|
|
221
|
+
injectReconcileTransaction: function (ReconcileTransaction) {
|
|
222
|
+
!ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
|
|
223
|
+
ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
injectBatchingStrategy: function (_batchingStrategy) {
|
|
227
|
+
!_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
|
|
228
|
+
!(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
|
|
229
|
+
!(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
|
|
230
|
+
batchingStrategy = _batchingStrategy;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
var ReactUpdates = {
|
|
235
|
+
/**
|
|
236
|
+
* React references `ReactReconcileTransaction` using this property in order
|
|
237
|
+
* to allow dependency injection.
|
|
238
|
+
*
|
|
239
|
+
* @internal
|
|
240
|
+
*/
|
|
241
|
+
ReactReconcileTransaction: null,
|
|
242
|
+
|
|
243
|
+
batchedUpdates: batchedUpdates,
|
|
244
|
+
enqueueUpdate: enqueueUpdate,
|
|
245
|
+
flushBatchedUpdates: flushBatchedUpdates,
|
|
246
|
+
injection: ReactUpdatesInjection,
|
|
247
|
+
asap: asap
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
module.exports = ReactUpdates;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
module.exports = '15.5.0';
|