Answers for "set state giving previously update data"

0

set state giving previously update data

This callback is really messy. Just use async await instead:

async openAddBoardModal(){
    await this.setState({ boardAddModalShow: true });
    console.log(this.state.boardAddModalShow);
}
Posted by: Guest on September-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language