I have a react-redux container component that is created within a React Native Navigator component. I want to be able to pass the navigator as a prop to this container component
If you are using decorators, the code below give an example in the case you want to use decorators for your redux connect.
@connect(
(state, ownProps) => {
return {
Foo: ownProps.Foo,
}
}
)
export default class Bar extends React.Component {
If you now check this.props.Foo
you will see the prop that was added from where the Bar
component was used.
In this case this.props.Foo
will be the string 'Baz'
Hope this clarifies some things.