Permalink
Browse files

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
  • Loading branch information...
sebmarkbage authored and facebook-github-bot committed Feb 28, 2017
1 parent 31628f3 commit 5eb3ab3522bd1d46fb4f8471c8207f1e0bc2cc25
Showing with 1 addition and 1 deletion.
  1. +1 −1 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,
};

1 comment on commit 5eb3ab3

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Apr 21, 2017

Member

This caught people in the open source by surprise. Did we call this change out anywhere?

Member

gaearon commented on 5eb3ab3 Apr 21, 2017

This caught people in the open source by surprise. Did we call this change out anywhere?

Please sign in to comment.