2

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();
  }
vvv
  • 373
  • 1
  • 3
  • 8

0 Answers0