callstackincubator / rebolt-navigation

Fast and declarative router for Rebolt
https://rebolt-navigation.callstack.com/
MIT License
208 stars 11 forks source link

Fix problem with dynamic header props on StackNavigation.Screen #124

Open baransu opened 6 years ago

baransu commented 6 years ago

Changes StackNavigator.Screen from statelessComponent to statelesscomponentWithRetainedProps. It allow us to check for header props changes and call navigation.setOptions when they change. Only problem are properties that are recreated every time like Style.t or (probably) Header.returnsComponent.

I've also updated example app to have dynamic headerTitle on Admin screen.

Fixes #122