satya164/react-navigation-addons

setOptions no longer working

stief510 opened this issue · 1 comments

I was using enhance to use the .setOptions

I am trying to set the title

    this.props.navigation.setOptions({
      header: ( {state}, defaultHeader ) => {
        return ({
          ...defaultHeader,
          visible: true,
          title: _t("Recipient Details"),
          right: (<NavButton onPress={this.onNext} title={_t("Next")} disabled={false}/>),
        })
      }
    });

But nothing is happening

If I move it out of componentWillMount into componentDidMount it now works