-
Notifications
You must be signed in to change notification settings - Fork 840
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
[Tech debt] Remove defaultProps
from function components
#7297
Conversation
- remove totally unused prop - convert other to `= {}` fallback
…tion - a few hard-coded props (that were present in the table) should have been defined in the destructure fallbacks, so that their defaults display in our docs prop table
Preview staging links for this PR:
|
💚 Build Succeeded
|
|
||
AppContext.propTypes = { | ||
children: PropTypes.any, | ||
currentRoute: PropTypes.object.isRequired, |
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.
Did we lose this or is it just no longer neccessary?
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.
Not necessary - it wasn't even being used, so my guess was it was a bad copy/paste job
Thanks for the review Jason! ❤️ |
Summary
See #7287 (NOTE: Does not close the issue fully - we need #7296 for that as well)
React 18 is deprecating support for
defaultProps
- this PR removes all instances of function componentdefaultProps
, and also checks that all props tables in our docs work as expected.QA
false
forisLoading
andcompressed
anchorPosition
,attachToAnchor
,repositionToCrossAxis
,display
,panelPaddingSize
, andownFocus
(compare to the defaultEuiPopover
props)General checklist
@default
if default values are missing)and playground toggles