react-router-native
react-router-native copied to clipboard
What would be the best way to dynamically change content of overlay from scene?
Moved question to https://github.com/facebook/react-native/issues/8350
See my comment here. In terms of react-router-native, we should probably make this easier by passing the overlay
ref
in props to route
components as soon as facebook/react-native@c57bac4767fe4301ff4515b073d26245c6905610 lands in a stable release.
Excited for new changes in NavigationExperimental!
Same here. I think we are only a couple weeks away from calling it just Navigation
. ⌛️
🍺
@jmurzy Hey, posting the gist I linked to from Discord so others can follow-along/help. This is my attempt (not a runnable example, but has all relevant redux code) at using redux to control the title of a overlayComponent. The issue is that the actions do not fire when routes change from pop/back/etc because the components have already rendered.
https://gist.github.com/cpsubrian/278ad43f79f2301c4aba1cb5401fca99
@cpsubrian Thanks for the gist. I'll try to reproduce this on my end, and get back to you in the next few days.
Yeah no rush, in the meantime just adding the header in the component. Would be nice to get the animations driven by the interpolators back at some point though.
Thanks for taking a look.
Is it possible to pass information in <Route/> to compoent and overlay? I have the two paths below and only need to add title of the header and the text inside of TextView.
<Route path="/help" component={TextView} overlayComponent={HomeHeader}/>
<Route path="/information" component={TextView} overlayComponent={HomeHeader} />
something like
<Route path="/help" component={TextView} overlayComponent={HomeHeader} title="Help" text="Help Text"/>
<Route path="/information" component={TextView} overlayComponent={HomeHeader} title="Information" text="bla bla..."/>