Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move setState callback to right after didUpdate #8204

Merged
merged 1 commit into from
Nov 5, 2016

Conversation

sophiebits
Copy link
Collaborator

It's much easier to do it this way in Fiber and there shouldn't be much observable difference.

It's much easier to do it this way in Fiber and there shouldn't be much observable difference.
@acdlite
Copy link
Collaborator

acdlite commented Nov 4, 2016

Not sure how related this is, but there's also a bug in stack where setState callbacks enqueued inside componentWillMount aren't flushed properly: https://github.com/facebook/react/blob/master/src/renderers/shared/stack/reconciler/__tests__/ReactCompositeComponentState-test.js#L174-L207

Should that be dealt with separately?

@sophiebits
Copy link
Collaborator Author

I'll fix that now but in a separate PR.

@acdlite
Copy link
Collaborator

acdlite commented Nov 4, 2016

LGTM but someone who knows stack should give final approval

@jimbolla
Copy link

jimbolla commented Nov 9, 2016

Is there any chance this change makes it into a React 15.x release? This actually fixes an issue in the next version of react-redux? Would be great to have this sooner than React 16.

@gaearon
Copy link
Collaborator

gaearon commented Nov 9, 2016

Since it's a potentially breaking change, it can only land in a major version.

acusti pushed a commit to brandcast/react that referenced this pull request Mar 15, 2017
It's much easier to do it this way in Fiber and there shouldn't be much observable difference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants