-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor(with-state, structured-list, combobox): replace unsafe lifecycle methods #5418
Conversation
Deploy preview for carbon-elements ready! Built with commit 426e7ea |
Deploy preview for carbon-components-react ready! Built with commit 426e7ea https://deploy-preview-5418--carbon-components-react.netlify.com |
constructor(props) { | ||
super(props); | ||
this.state = { | ||
initialState: this.props.initialState, |
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 you mean this.state = this.props.initialState
?
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.
Yep, my bad!
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.
looks good to me
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.
LGTM 👍 - Thanks @abbeyhrt!
Refs #4902
This removes and replaces the functionality of the unsafe lifecycle methods from
withState
, StructuredList, and Combobox.Changelog
Removed
Testing / Reviewing
Make sure that StructuredList, Combobox, and the components that use withState (Dropdown, DatePicker, and Combobox) work as expected