React-Native passing props/params between children of DrawerNavigator
I have my DrawerNavigator setup as this
export const Drawer = createDrawerNavigator({
Home:Home,
Profile:Profile
},{
contentComponent:DrawerComponent
})
The navigator itself is a child of StackNavigator.
Now, the question is how do I pass props/param between Home and Profile?
Any reading recommendation and StackOverflow answers are welcome, I didn't find anything similar to this though
Also, I am only accessing Profile from my drawer.
is redux the only way here?
android react-native react-navigation react-navigation-drawer
add a comment |
I have my DrawerNavigator setup as this
export const Drawer = createDrawerNavigator({
Home:Home,
Profile:Profile
},{
contentComponent:DrawerComponent
})
The navigator itself is a child of StackNavigator.
Now, the question is how do I pass props/param between Home and Profile?
Any reading recommendation and StackOverflow answers are welcome, I didn't find anything similar to this though
Also, I am only accessing Profile from my drawer.
is redux the only way here?
android react-native react-navigation react-navigation-drawer
just so I can understand better, you want to pass props between Home -> Profile or from Drawer -> Home/Profile
– kivul
Nov 23 '18 at 13:02
between Home and Profile
– anurag145
Nov 24 '18 at 4:28
see if this link helps: stackoverflow.com/questions/44636886/…
– kivul
Nov 24 '18 at 10:16
this is different if I can get access to the navigation prop of drawerNavigator where I can use setParam in Home, that will work unfortunately I couldn't make it work using redux for now
– anurag145
Nov 24 '18 at 10:51
you can pass props to a HOC, also check this link: stackoverflow.com/questions/44694176/…
– kivul
Nov 24 '18 at 11:10
add a comment |
I have my DrawerNavigator setup as this
export const Drawer = createDrawerNavigator({
Home:Home,
Profile:Profile
},{
contentComponent:DrawerComponent
})
The navigator itself is a child of StackNavigator.
Now, the question is how do I pass props/param between Home and Profile?
Any reading recommendation and StackOverflow answers are welcome, I didn't find anything similar to this though
Also, I am only accessing Profile from my drawer.
is redux the only way here?
android react-native react-navigation react-navigation-drawer
I have my DrawerNavigator setup as this
export const Drawer = createDrawerNavigator({
Home:Home,
Profile:Profile
},{
contentComponent:DrawerComponent
})
The navigator itself is a child of StackNavigator.
Now, the question is how do I pass props/param between Home and Profile?
Any reading recommendation and StackOverflow answers are welcome, I didn't find anything similar to this though
Also, I am only accessing Profile from my drawer.
is redux the only way here?
android react-native react-navigation react-navigation-drawer
android react-native react-navigation react-navigation-drawer
edited Nov 23 '18 at 12:32
anurag145
asked Nov 23 '18 at 12:24
anurag145anurag145
5110
5110
just so I can understand better, you want to pass props between Home -> Profile or from Drawer -> Home/Profile
– kivul
Nov 23 '18 at 13:02
between Home and Profile
– anurag145
Nov 24 '18 at 4:28
see if this link helps: stackoverflow.com/questions/44636886/…
– kivul
Nov 24 '18 at 10:16
this is different if I can get access to the navigation prop of drawerNavigator where I can use setParam in Home, that will work unfortunately I couldn't make it work using redux for now
– anurag145
Nov 24 '18 at 10:51
you can pass props to a HOC, also check this link: stackoverflow.com/questions/44694176/…
– kivul
Nov 24 '18 at 11:10
add a comment |
just so I can understand better, you want to pass props between Home -> Profile or from Drawer -> Home/Profile
– kivul
Nov 23 '18 at 13:02
between Home and Profile
– anurag145
Nov 24 '18 at 4:28
see if this link helps: stackoverflow.com/questions/44636886/…
– kivul
Nov 24 '18 at 10:16
this is different if I can get access to the navigation prop of drawerNavigator where I can use setParam in Home, that will work unfortunately I couldn't make it work using redux for now
– anurag145
Nov 24 '18 at 10:51
you can pass props to a HOC, also check this link: stackoverflow.com/questions/44694176/…
– kivul
Nov 24 '18 at 11:10
just so I can understand better, you want to pass props between Home -> Profile or from Drawer -> Home/Profile
– kivul
Nov 23 '18 at 13:02
just so I can understand better, you want to pass props between Home -> Profile or from Drawer -> Home/Profile
– kivul
Nov 23 '18 at 13:02
between Home and Profile
– anurag145
Nov 24 '18 at 4:28
between Home and Profile
– anurag145
Nov 24 '18 at 4:28
see if this link helps: stackoverflow.com/questions/44636886/…
– kivul
Nov 24 '18 at 10:16
see if this link helps: stackoverflow.com/questions/44636886/…
– kivul
Nov 24 '18 at 10:16
this is different if I can get access to the navigation prop of drawerNavigator where I can use setParam in Home, that will work unfortunately I couldn't make it work using redux for now
– anurag145
Nov 24 '18 at 10:51
this is different if I can get access to the navigation prop of drawerNavigator where I can use setParam in Home, that will work unfortunately I couldn't make it work using redux for now
– anurag145
Nov 24 '18 at 10:51
you can pass props to a HOC, also check this link: stackoverflow.com/questions/44694176/…
– kivul
Nov 24 '18 at 11:10
you can pass props to a HOC, also check this link: stackoverflow.com/questions/44694176/…
– kivul
Nov 24 '18 at 11:10
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446682%2freact-native-passing-props-params-between-children-of-drawernavigator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446682%2freact-native-passing-props-params-between-children-of-drawernavigator%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
just so I can understand better, you want to pass props between Home -> Profile or from Drawer -> Home/Profile
– kivul
Nov 23 '18 at 13:02
between Home and Profile
– anurag145
Nov 24 '18 at 4:28
see if this link helps: stackoverflow.com/questions/44636886/…
– kivul
Nov 24 '18 at 10:16
this is different if I can get access to the navigation prop of drawerNavigator where I can use setParam in Home, that will work unfortunately I couldn't make it work using redux for now
– anurag145
Nov 24 '18 at 10:51
you can pass props to a HOC, also check this link: stackoverflow.com/questions/44694176/…
– kivul
Nov 24 '18 at 11:10