Skip to content

Stack handle error#8864

Closed
edvinerikson wants to merge 2 commits into
facebook:masterfrom
edvinerikson:stack-handle-error
Closed

Stack handle error#8864
edvinerikson wants to merge 2 commits into
facebook:masterfrom
edvinerikson:stack-handle-error

Conversation

@edvinerikson
Copy link
Copy Markdown
Contributor

Not sure how I would structure the test for it or even if the fix is the correct place to fix it.
Also fiber seems to crash, might be that the state update is missed in unstable_handleError (maybe that is accurate)
Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from master.
  2. If you've added code that should be tested, add tests!
  3. If you've changed APIs, update the documentation.
  4. Ensure the test suite passes (npm test).
  5. Make sure your code lints (npm run lint).
  6. Run the Flow typechecks (npm run flow).
  7. If you added or removed any tests, run ./scripts/fiber/record-tests before submitting the pull request, and commit the resulting changes.
  8. If you haven't already, complete the CLA.

@edvinerikson
Copy link
Copy Markdown
Contributor Author

http://codepen.io/anon/pen/mRMXEG?editors=0011

open the console tab and you will see that it only logs render and error but it should log render, error and render

@gaearon
Copy link
Copy Markdown
Collaborator

gaearon commented Jan 25, 2017

A boundary does not catch its own errors. It only catches errors in its children.
Otherwise it has a potential for infinite loops.

Errors in the boundary itself will propagate up to the next parent boundary. (Or top level.)

@edvinerikson
Copy link
Copy Markdown
Contributor Author

Ah, yeah that makes sense!

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.

3 participants