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

Wrap _performComponentUpdate call in try/finally #897

Merged
merged 1 commit into from
Jan 15, 2014

Conversation

sophiebits
Copy link
Collaborator

Fixes #208. If you attempt a state update with a bad state then the render
will fail (and the DOM won't change) but if you switch back to a valid state
later then it'll rerender properly.

Fixes facebook#208. If you attempt a state update with a bad state then the render will fail (and the DOM won't change) but if you switch back to a valid state later then it'll rerender properly.
@vjeux
Copy link
Contributor

vjeux commented Jan 15, 2014

Does it have any effect on performance? I fear that adding a try catch there is going to be bad for perf

@sophiebits
Copy link
Collaborator Author

With react-bench, not measurably.

@petehunt
Copy link
Contributor

I'm 99% sure that this is OK since there isn't that much work done in this frame.

@vjeux
Copy link
Contributor

vjeux commented Jan 15, 2014

Nice, this is an awesome fix then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReactCompositeComponent.mountComponent needs a try/finally
3 participants