title: Close react-bootstrap modal on submit
body: <p>I would like to ask on how can I close the react-bootstrap modal after I submit the form. Here's my code:</p>
  
  <pre><code>class BoardAdd extends React.Component {
  
      constructor(props){
          super(props);
  
          this.state = {
              name: '',
              boardAddModalShow: false
          }
  
      }
      openAddBoardModal(){
          this.setState({ boardAddModalShow: true });
  
      }
  
      closeAddBoardModal(){
          this.setState({ boardAddModalShow: false });
      }
  
      addBoard(formProps) {
          this.props.dispatch(reset('BoardAddModalForm'));
          this.closeAddBoardModal;
      }
  
      render() {
  
          const { error, handleSubmit } = this.props;
  
          return (
              &lt;Col lg={3}&gt;
                  &lt;a href="javascript:;" className={style.boardItemAdd} onClick={this.openAddBoardModal.bind(this)}&gt;
                      &lt;div className={[style.boardItemContainer,style.boardItemGray].join(' ')}&gt;
                          Create New Board
                      &lt;/div&gt;
                  &lt;/a&gt;
  
                  &lt;Modal show={this.state.boardAddModalShow} onHide={this.closeAddBoardModal.bind(this)} bsSize="small" aria-labelledby="contained-modal-title-sm"&gt;
                      &lt;Modal.Header closeButton&gt;
                          &lt;Modal.Title id="contained-modal-title-sm"&gt;Create Board&lt;/Modal.Title&gt;
                      &lt;/Modal.Header&gt;
                      &lt;Modal.Body&gt;
                          &lt;form onSubmit={handleSubmit(this.addBoard.bind(this))}&gt;
  
                              &lt;Field name="name" component={renderField} type="text" placeholder="What are you organizing" /&gt;
                              &lt;button className="btn"&gt;Submit&lt;/button&gt;
                          &lt;/form&gt;
  
                      &lt;/Modal.Body&gt;
                  &lt;/Modal&gt;
  
              &lt;/Col&gt;
          )
      }
  }
  </code></pre>
  
  <p>I try to call the closeAddBoardModal inside the addBoard function like what I did on the onHide props of <code>&lt;Modal&gt;</code> but still no luck, the Modal wont still close :(</p>