-
Notifications
You must be signed in to change notification settings - Fork 68
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
CPLAT-3094 Lifecycle Error Boundary #175
CPLAT-3094 Lifecycle Error Boundary #175
Conversation
As an update with where this currently stands... This implementation is working but the We are able to get at the dart exception in ways laid out in the ticket but we are hoping to get sign off from the dart team before moving forward with that... because this is branched from #160 that has not been merged yet a cleaner diff can be found here: kealjones-wk/react-dart@react-16-new-context...cleandart:CPLAT-3094-lifecycle-error-boundary |
# Conflicts: # lib/react.js.map # lib/react_with_addons.js.map # lib/react_with_react_dom_prod.js.map # package-lock.json
…s/react16/CPLAT-3094-lifecycle-error-boundary
…ndart/react-dart into CPLAT-3094-lifecycle-error-boundary Catch up local branch with remote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small things, but otherwise looking really solid!!
Co-Authored-By: joebingham-wk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+10
Description
In order to allow for the possibility of React 16 error boundaries, we needed to add
getDerivedStateFromError
andcomponentDidCatch
lifecycle events. However, we also needed to ensure that not every component becomes and error boundary. Consequently,skipMethods
was introduced toregisterComponent
.Changes
componentDidCatch
.getDerivedStateFromError
.skipMethods
._filterSkipMethods
to ensure that a consumer cannot skip important lifecycle events._dart_helpers.js
removing lifecycle events based upon the final skipMethods list.react_test.dart
Testing Suggestions