@samitouri / QOS-React / commits / abcd567325

Make "unexpected batch number" a warning (#7133)

This was added to catch internal errors in React but doesn't seem to be doing much good except frustrating people more when their apps throw (#6895, FB-internal t11950821). Until more proper error boundaries land, let's make this a warning.

Ben Alpert committed Jun 27, 2016 at 13:39 UTC abcd5673251b3e17fc42ea9c93a2c6bd4068855e
1 file changed +2 -2
src/renderers/shared/stack/reconciler/ReactReconciler.js
+2 -2
@@ -14,7 +14,7 @@
14 var ReactRef = require('ReactRef');
15 var ReactInstrumentation = require('ReactInstrumentation');
16
17 -var invariant = require('invariant');
17 +var warning = require('warning');
18
19 /**
20 * Helper to call ReactRef.attachRefs with this composite component, split out
@@ -206,7 +206,7 @@ var ReactReconciler = {
206 if (internalInstance._updateBatchNumber !== updateBatchNumber) {
207 // The component's enqueued batch number should always be the current
208 // batch or the following one.
209 - invariant(
209 + warning(
210 internalInstance._updateBatchNumber == null ||
211 internalInstance._updateBatchNumber === updateBatchNumber + 1,
212 'performUpdateIfNecessary: Unexpected batch number (current %s, ' +