Using ES6, the initial state must be created in your constructor for the React component class, like this:
constructor(props) {
super(props)
this.state ={
// Set your state here
}
}
See this documentation.
Using ES6, the initial state must be created in your constructor for the React component class, like this:
constructor(props) {
super(props)
this.state ={
// Set your state here
}
}
See this documentation.