I have a requirement where in I have to set the initial state value of the state based on the other state value in class based component.
this.state = {
element1: false,
element2: element1 ? "show": "hide"
}
I have a requirement where in I have to set the initial state value of the state based on the other state value in class based component.
this.state = {
element1: false,
element2: element1 ? "show": "hide"
}