Skip to content

[Fiber] Missing error causes an infinite loop #9092

New issue

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

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

Already on GitHub? # to your account

Closed
gaearon opened this issue Mar 2, 2017 · 1 comment
Closed

[Fiber] Missing error causes an infinite loop #9092

gaearon opened this issue Mar 2, 2017 · 1 comment
Assignees

Comments

@gaearon
Copy link
Collaborator

gaearon commented Mar 2, 2017

I'm getting an issue where throwing an unhandled error turns into an infinite loop because the guarded callback wrapper fails to extract the error from the event:

screen shot 2017-03-02 at 3 19 09 am

This causes the reconciler to ignore the error, thus triggering it again.

To reproduce, I flipped useSyncScheduling to false in ReactDOMFiber (not sure if that was important), started examples/real-world from Redux and added a throw to its User component.

gaearon referenced this issue Mar 2, 2017
We can use this more flexible version for error handling in Fiber.

The DEV mode version uses same fake event trick as before to preserve
"break on uncaught exception" behavior when debugging.
@gaearon
Copy link
Collaborator Author

gaearon commented Jul 11, 2017

Closing as duplicate of #9193 with more discussion.

@gaearon gaearon closed this as completed Jul 11, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants