What is the difference between
this.setState({visibility:!this.state.visibility})
and this:
this.setState(state=>({visibility:!state.visibility}))
What is the difference between
this.setState({visibility:!this.state.visibility})
and this:
this.setState(state=>({visibility:!state.visibility}))