Actions.Push not passing in props to component or scene?
See original GitHub issueVersion
Tell us which versions you are using:
react-native-router-flux: v4.0.1 react: v16.3.1 react-native: v0.55.2 Typescript: v2.8.3
Expected behaviour
When I use Actions.push(“route”, {title: “some title”}) or any other variations I have found i your docs it doesn’t seem to add anything to the props. The push will work correctly but it won’t add the new props.
Actual behaviour
I would expect the props to be added to the component / scene when added to a push.
What I’ve tried
In components to navigate:
Actions.push("wishlistDetails", { title: "title" });
Actions.push("wishlistDetails", { props: { title: "title" } });
Actions.wishlistDetails({title: "title"});
Actions.wishlistDetails({ props: { title: "title" } });
Inside ComponentDidMounts/ willMounts etc
Actions.refresh({ props: { title: "title" } });
Actions.refresh({ title: "title" });
I’ve gone around stack overflow and nothing seems to work. If I pass whatever prop directly into the scene it will be passed through to the component and the Scene, but the action function doesn’t seem to do anything.
Any help would be much appreciated!!
Thanks,
Chris
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:9 (2 by maintainers)
Top GitHub Comments
@codepressd If you have your screens nested try
Actions._wishlistDetails(props)
(note added_
).Thanks @gradam it works!