rebolt-navigation
rebolt-navigation copied to clipboard
Navigation's headerTitle is fixed
When I use Rebolt's stack navigation with navigation bars, I can initialize the title of the navigation by setting the property headerTitle
of a screen component. The title then remains fixed to this initial value. If I want to have it changed dynamically, whenever some state in my app changes, the only "option" (this is not really an option) is to leave the screen and reopen it.
Usually the default behaviour is fine. However, if you implement a language switch inside the app, you will see that every screen on the stack (at the moment when the language is switched) keeps its title as long as it is alive.
Ultimately I have to restart the app to see any changes in the navigation bar for the start screen of the app.
Right now StackNavigator assigns header props in Screen's didMount
lifecycle and ignores further changes. There is possibility to use retainedProps
and update header in didUpdate
lifecycle. #124 should fix that.