class ... {
state = {
anyProp: this.props.anyProp
}
...
}
return (
...
<input defaultValue={this.showText} onInput={this.showText2} />
{this.showText2.length < 6 && <MyWarningMessage />}
);
constructor(props) {
super(props);
this.state = {
isBlock: localStorage.getItem("isBlock") === "false" ? false : true;
}
}