I\'m trying to create variables and a function inside a state like this
state = { modalVisible: false, photo:"" g
Yes you can.
class App extends Component { func1 = () => { this.setState({flag:!this.state.flag}) } state = { flag:true, doclick:this.func1 } }