Issues with hiding Form in onSubmit

I am trying to remove a Form in the returned promise that i supply to the Form’s submit method. However, it keep getting a React error that makes it seem like the form itself is doing some state changes after i removed the form.

I described the issue better here: https://stackoverflow.com/questions/55743592/issues-with-state-changes-in-submit-method-of-atlaskit-form

What can i do to properly remove the form?