score:0

handleWidgetSelection=(id) => {
    this.setState({selectedWidgetId: id},() => {
        console.log(this.state.selectedWidgetId); //state is updated now.
    })
}

Related Query

More Query from same tag