From d441128bf6691fa8060fc53c0e3ac704df3a473c Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Mon, 27 Jun 2016 13:39:23 -0700 Subject: [PATCH] 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. (cherry picked from commit abcd5673251b3e17fc42ea9c93a2c6bd4068855e) --- src/renderers/shared/stack/reconciler/ReactReconciler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/shared/stack/reconciler/ReactReconciler.js b/src/renderers/shared/stack/reconciler/ReactReconciler.js index f9e6473b7a..99fb813de3 100644 --- a/src/renderers/shared/stack/reconciler/ReactReconciler.js +++ b/src/renderers/shared/stack/reconciler/ReactReconciler.js @@ -14,7 +14,7 @@ var ReactRef = require('ReactRef'); var ReactInstrumentation = require('ReactInstrumentation'); -var invariant = require('invariant'); +var warning = require('warning'); /** * Helper to call ReactRef.attachRefs with this composite component, split out @@ -206,7 +206,7 @@ var ReactReconciler = { if (internalInstance._updateBatchNumber !== updateBatchNumber) { // The component's enqueued batch number should always be the current // batch or the following one. - invariant( + warning( internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' +