From 5eb3ab3522bd1d46fb4f8471c8207f1e0bc2cc25 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Tue, 28 Feb 2017 12:06:28 -0800 Subject: [PATCH] Switch componentWillMount / componentWillUnmount order Summary: This switches our React feature flag so that componentWillMount happens before componentWillUnmount when a child switches. It used to be inconsistent and this makes it consistent and inline with what React Fiber does. Breaking change. May cause issues. Reviewed By: spicyj, bvaughn Differential Revision: D4626543 fbshipit-source-id: f7eaf1ebd479ca9fada012f903a2f972a7901b40 --- .../Renderer/src/renderers/shared/utils/ReactFeatureFlags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Renderer/src/renderers/shared/utils/ReactFeatureFlags.js b/Libraries/Renderer/src/renderers/shared/utils/ReactFeatureFlags.js index febb154d2..ce0a442c1 100644 --- a/Libraries/Renderer/src/renderers/shared/utils/ReactFeatureFlags.js +++ b/Libraries/Renderer/src/renderers/shared/utils/ReactFeatureFlags.js @@ -17,7 +17,7 @@ var ReactFeatureFlags = { // render (both initial renders and updates). Useful when looking at prod-mode // timeline profiles in Chrome, for example. logTopLevelRenders: false, - prepareNewChildrenBeforeUnmountInStack: false, + prepareNewChildrenBeforeUnmountInStack: true, disableNewFiberFeatures: false, };