I need to read one value and use it to set title in navigation bar.
I am using react-native-router-flux
and I also use redux.
I navigate to view where I set language and fire redux action.
All views receive new state and in render()
method I can call:
console.log(this.props.language.language)
This is set through redux. And I want to change navigation bar title like:
Actions.refresh({title: I18n.t('main', {locale: this.props.language.language})})
But this slows down application and don't work.
But don't know where to put it if not in render
method.