Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What would be the best way to dynamically change content of overlay from scene? #26

Open
joonhocho opened this issue Jun 23, 2016 · 8 comments

Comments

@joonhocho
Copy link

joonhocho commented Jun 23, 2016

Moved question to facebook/react-native#8350

@jmurzy
Copy link
Owner

jmurzy commented Jun 24, 2016

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@c57bac4 lands in a stable release.

@joonhocho
Copy link
Author

Excited for new changes in NavigationExperimental!

@jmurzy
Copy link
Owner

jmurzy commented Jun 24, 2016

Same here. I think we are only a couple weeks away from calling it just Navigation. ⌛️

🍺

@cpsubrian
Copy link
Contributor

@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

@jmurzy
Copy link
Owner

jmurzy commented Jul 12, 2016

@cpsubrian Thanks for the gist. I'll try to reproduce this on my end, and get back to you in the next few days.

@cpsubrian
Copy link
Contributor

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.

@cpsubrian
Copy link
Contributor

Thanks for taking a look.

@Eightyplus
Copy link

Is it possible to pass information in 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..."/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants