Reputation: 23
I know that I can do something like this:
Actions.routeName(someDataObject)
What if I want to add an initial props to a a component rendered by a scene at creation? At this point 'Actions' is unavailable?
Upvotes: 0
Views: 86
Reputation: 23
Ah, Just realized that any props passed to the 'Scene' component are available in the component that is being rendered by that scene.
So, something like this
<Scene
key={route.key}
component={route.component}
initialProps={route.initialProps}
title={route.title}
hideNavBar={route.hideNavBar}
hideDrawerButton={false}
initial={route.initial}
/>
will mean that initialProps will be available in 'props.component'.
Upvotes: 0