Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
}
 
PREVIOUS NEXT
Tagged: #set #state #giving #previously #update #data
ADD COMMENT
Topic
Name
4+7 =