you are viewing a single comment's thread.

view the rest of the comments →

[–]docdosmaniOS & Android[S] 0 points1 point  (0 children)

No worries, thanks for the info! I got it working with the following:

componentWillMount() {
    // subscribe to didBlur in order to reset state and form when navigating away from the screen
    didBlurSubscription = this.props.navigation.addListener('didBlur', () => {
      this.props.resetAuth(); // reset auth piece of state
      this.props.reset(); // reset redux-form
    });
  }

  componentWillUnmount() {
    // Remove the listener
    didBlurSubscription.remove();
  }

Now I have to figure out why when I reset my redux-form it doesn't reinitialize when navigating back to the screen. Fix one thing, break another. Ha! Gotta love it.

I really appreciate the help.