mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-18 01:55:00 +01:00
remove derivedStateFromProps
This commit is contained in:
@@ -30,10 +30,6 @@ export default class TextInput extends React.Component<IProps, IState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static getDerivedStateFromProps(props: IProps, state: IState) {
|
|
||||||
return { value: props.value || '' }
|
|
||||||
}
|
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
if (this.props.initalValue) {
|
if (this.props.initalValue) {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
Reference in New Issue
Block a user