Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
KibanaErrorBoundary initial implementation #168754
KibanaErrorBoundary initial implementation #168754
Changes from 20 commits
d79d5c5
3f6d7bd
8ae90f5
83bb621
5d407bd
4700a45
bda5264
957ee1b
45d8560
d4a4bda
1f8e327
e8ebb2d
ba420c5
dc15a23
cf81e93
8784b20
c2559e8
e9cf725
047b271
d0757f3
4bc61e9
3e37880
a907a02
68cf0bf
539415f
58eb8a9
21573a1
e281111
0e48b4a
a25f52d
015769d
0f306f7
f0a58ce
bb49260
f76ff90
5925e34
d2aaad4
e0e3099
ed73007
b864106
c34a14a
7309f83
5a17940
2ab706a
57c8506
1c420da
f6f6c66
3f88017
251a1ce
a5ce5ff
0287190
cb43013
438742b
94fc6ee
248576e
238a361
70895c5
23c77fa
fbdadcd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
this probably should be
But I am not sure that there is any benefit to it, since
value
below is always a new object and children will have to re-render. see https://legacy.reactjs.org/docs/context.html#caveatsThere 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.
realoadWindow
is so tiny, it is probably more efficient to create a new function every re-render than to memoize it:For the context provider value object to always have the same identity, so that other components don't re-render if this component re-renders, the context value could be a single object:
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.
Thank you for these suggestions!
Since
KibanaErrorBoundaryServices
is just an interface, I'll go with: