You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the defaults static methods come before lifecycle (including constructor) and everything-else. Why does it want me to move gDSFP after the constructor?
30:5 warning getDerivedStateFromProps should be placed after constructor react/sort-comp
This is my component:
export default class FilterFormComponent extends React.Component {
static propTypes = {
setParentField: propTypes.func.isRequired
};
static getDerivedStateFromProps(props, prevState) {
// override internal state from props.
// this allows other widgets and reducers to perform
// corrections which will be reflected next time the
// component is rendered
return {...prevState, ...props};
}
constructor(props) {
super(props);
this.state = {};
}
}
The text was updated successfully, but these errors were encountered:
ThiefMaster
changed the title
static properties not properly handled in sort-comp
static methods not properly handled in sort-comp
Jun 14, 2018
According to the defaults static methods come before lifecycle (including constructor) and everything-else. Why does it want me to move gDSFP after the constructor?
This is my component:
The text was updated successfully, but these errors were encountered: