titleView prop in Navigator.Config?
nfcampos opened this issue · 1 comments
nfcampos commented
Would it make sense to add a titleView
prop to Navigator.Config
to be able to use a custom view in place of the title?
Something like:
<Navigator.Config
titleView="SomeView"
/>
where SomeView
is
...
AppRegistry.registerComponent('SomeView', () => SomeView)
and possibly a titleViewProps
prop for props to pass to the view.
It's not the ideal API, I think, I'd want this instead
<Navigator.Config
titleView={<SomeView prop="value" />}
/>
but I'm not sure how feasible that is
Super useful either way IMO, what do you guys think?
(EDIT: this might make sense only for iOS, not sure about that)
benkraus commented
I have a pull request that adds support for a title view image, which is a fairly common use case there. I have it on my to do list to add support for a full on title view that is a component.