Hi I have a function close. When I call close, its calling popup before setting errors to []. Could you please help me.
close() {
if (this.state.errors.length !== 0) {
this.setState({
errors: [],
});
}
this.props.closePopup();
}