Passing Data Between 2 TabsHow to nest navigators with wrapping Views in React nativePass props to a nested TabnavigatorPassing Firebase data to another screen with React Navigation TabsTrigger Class Function Call from Tab Navigator Tab Press - React Native/NavigationHow to share state between tabs in react-native-router-flux?How to pass variable as a const one in react-navigationreact native render another component in mainReact Navigation - How to pass data across different screens in TabNavigator?passing params to nested TabNavigatorReact Native pass index

Password Hashing Security Using Scrypt & Argon2

Users forgetting to regenerate PDF before sending it

How does one acquire an undead eyeball encased in a gem?

What would +1/+2/+3 items be called in game?

Performance issue in code for reading line and testing for palindrome

Moving millions of files to a different directory with specfic name patterns

Why was such an unrevealing title originally chosen and then changed for some International markets?

Adjust the Table

Who buys a weak currency?

What are the effects of abstaining from eating a certain flavor?

Why is a mixture of two normally distributed variables only bimodal if their means differ by at least two times the common standard deviation?

What does the multimeter dial do internally?

Is it possible for a character at any level to cast all 44 Cantrips in one week without Magic Items?

This LM317 diagram doesn't make any sense to me

Intern not wearing safety equipment; how could I have handled this differently?

Publishing papers seem natural to many, while I find it really hard to think novel stuff to pursue till publication. How to cope up with this?

What exactly is a "murder hobo"?

How should I ask for a "pint" in countries that use metric?

Generalized Behrend version for Grothendieck-Lefschetz trace formula

Writing an ace/aro character?

Can the word "desk" be used as a verb?

QR codes, do people use them?

Did depressed people far more accurately estimate how many monsters they killed in a video game?

Red token deck mass token destruction enchantment protection mtg



Passing Data Between 2 Tabs


How to nest navigators with wrapping Views in React nativePass props to a nested TabnavigatorPassing Firebase data to another screen with React Navigation TabsTrigger Class Function Call from Tab Navigator Tab Press - React Native/NavigationHow to share state between tabs in react-native-router-flux?How to pass variable as a const one in react-navigationreact native render another component in mainReact Navigation - How to pass data across different screens in TabNavigator?passing params to nested TabNavigatorReact Native pass index






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Im building a an app that contain TabNavigator.
How in the first screen I initalize data that I also need in the second screen.
I want to know what is the best way to pass params between those screens



I've tried to use Navigation.setParams() from the first screen but in the second I didn't get it.



const PaymentsStack = createStackNavigator(
Payments:
screen: PaymentsScreen


);

const GraphsStack = createStackNavigator(
Graphs: GraphsScreen
);

createBottomTabNavigator(
PaymentsStack,
GraphsStack
);


class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
;



class GraphsScreen extends Component 
async componentDidMount()
const importantData = ??;
;



I want to know how to get the importantData that returned to PaymentsScreen in GraphsScreen



Thank You










share|improve this question
























  • Why don’t you use state management tools like redux, MobX to manage the entire app’s state?

    – Edison D'souza
    Mar 26 at 3:14











  • This is an option but currently I want to solve this without any state manager

    – aviyam ivgi
    Apr 2 at 12:29

















0















Im building a an app that contain TabNavigator.
How in the first screen I initalize data that I also need in the second screen.
I want to know what is the best way to pass params between those screens



I've tried to use Navigation.setParams() from the first screen but in the second I didn't get it.



const PaymentsStack = createStackNavigator(
Payments:
screen: PaymentsScreen


);

const GraphsStack = createStackNavigator(
Graphs: GraphsScreen
);

createBottomTabNavigator(
PaymentsStack,
GraphsStack
);


class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
;



class GraphsScreen extends Component 
async componentDidMount()
const importantData = ??;
;



I want to know how to get the importantData that returned to PaymentsScreen in GraphsScreen



Thank You










share|improve this question
























  • Why don’t you use state management tools like redux, MobX to manage the entire app’s state?

    – Edison D'souza
    Mar 26 at 3:14











  • This is an option but currently I want to solve this without any state manager

    – aviyam ivgi
    Apr 2 at 12:29













0












0








0








Im building a an app that contain TabNavigator.
How in the first screen I initalize data that I also need in the second screen.
I want to know what is the best way to pass params between those screens



I've tried to use Navigation.setParams() from the first screen but in the second I didn't get it.



const PaymentsStack = createStackNavigator(
Payments:
screen: PaymentsScreen


);

const GraphsStack = createStackNavigator(
Graphs: GraphsScreen
);

createBottomTabNavigator(
PaymentsStack,
GraphsStack
);


class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
;



class GraphsScreen extends Component 
async componentDidMount()
const importantData = ??;
;



I want to know how to get the importantData that returned to PaymentsScreen in GraphsScreen



Thank You










share|improve this question
















Im building a an app that contain TabNavigator.
How in the first screen I initalize data that I also need in the second screen.
I want to know what is the best way to pass params between those screens



I've tried to use Navigation.setParams() from the first screen but in the second I didn't get it.



const PaymentsStack = createStackNavigator(
Payments:
screen: PaymentsScreen


);

const GraphsStack = createStackNavigator(
Graphs: GraphsScreen
);

createBottomTabNavigator(
PaymentsStack,
GraphsStack
);


class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
;



class GraphsScreen extends Component 
async componentDidMount()
const importantData = ??;
;



I want to know how to get the importantData that returned to PaymentsScreen in GraphsScreen



Thank You







react-native react-navigation react-native-tabnavigator






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 4:51







user11093202

















asked Mar 25 at 23:24









aviyam ivgiaviyam ivgi

11 bronze badge




11 bronze badge












  • Why don’t you use state management tools like redux, MobX to manage the entire app’s state?

    – Edison D'souza
    Mar 26 at 3:14











  • This is an option but currently I want to solve this without any state manager

    – aviyam ivgi
    Apr 2 at 12:29

















  • Why don’t you use state management tools like redux, MobX to manage the entire app’s state?

    – Edison D'souza
    Mar 26 at 3:14











  • This is an option but currently I want to solve this without any state manager

    – aviyam ivgi
    Apr 2 at 12:29
















Why don’t you use state management tools like redux, MobX to manage the entire app’s state?

– Edison D'souza
Mar 26 at 3:14





Why don’t you use state management tools like redux, MobX to manage the entire app’s state?

– Edison D'souza
Mar 26 at 3:14













This is an option but currently I want to solve this without any state manager

– aviyam ivgi
Apr 2 at 12:29





This is an option but currently I want to solve this without any state manager

– aviyam ivgi
Apr 2 at 12:29












1 Answer
1






active

oldest

votes


















0














You could achieve that through getParam and setParam



class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
this.props.navigation.setParams( importantData );
;



class GraphsScreen extends Component
async componentDidMount()
const importantData = this.props.navigation.getParam('importantData');
;



getParam & getParam could solve the issue in the case you have in your question ... but I guess this use case is commonly managed by one of the popular global state management tools like redux or unstated as @Edison mentioned in his comment...






share|improve this answer

























  • This is doesn't work for me...

    – aviyam ivgi
    Apr 2 at 12:32











  • What error did you get ?

    – Hend El-Sahli
    Apr 2 at 12:34











  • I can't get the param that I set in the second screen.

    – aviyam ivgi
    Apr 2 at 20:50











  • @aviyamivgi is the value undefined ? and in shich event handler you tried to grab it ? cause if you're component is aleardy mounted, you 'll need to get the value inside your componentWillRecieveProps event

    – Hend El-Sahli
    Apr 2 at 20:54












  • I don get it ?? ... I meant to call these handlers inside your screen that you render by your TabNavigator like PaymentsScreen

    – Hend El-Sahli
    Apr 2 at 21:33










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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55347798%2fpassing-data-between-2-tabs%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You could achieve that through getParam and setParam



class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
this.props.navigation.setParams( importantData );
;



class GraphsScreen extends Component
async componentDidMount()
const importantData = this.props.navigation.getParam('importantData');
;



getParam & getParam could solve the issue in the case you have in your question ... but I guess this use case is commonly managed by one of the popular global state management tools like redux or unstated as @Edison mentioned in his comment...






share|improve this answer

























  • This is doesn't work for me...

    – aviyam ivgi
    Apr 2 at 12:32











  • What error did you get ?

    – Hend El-Sahli
    Apr 2 at 12:34











  • I can't get the param that I set in the second screen.

    – aviyam ivgi
    Apr 2 at 20:50











  • @aviyamivgi is the value undefined ? and in shich event handler you tried to grab it ? cause if you're component is aleardy mounted, you 'll need to get the value inside your componentWillRecieveProps event

    – Hend El-Sahli
    Apr 2 at 20:54












  • I don get it ?? ... I meant to call these handlers inside your screen that you render by your TabNavigator like PaymentsScreen

    – Hend El-Sahli
    Apr 2 at 21:33















0














You could achieve that through getParam and setParam



class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
this.props.navigation.setParams( importantData );
;



class GraphsScreen extends Component
async componentDidMount()
const importantData = this.props.navigation.getParam('importantData');
;



getParam & getParam could solve the issue in the case you have in your question ... but I guess this use case is commonly managed by one of the popular global state management tools like redux or unstated as @Edison mentioned in his comment...






share|improve this answer

























  • This is doesn't work for me...

    – aviyam ivgi
    Apr 2 at 12:32











  • What error did you get ?

    – Hend El-Sahli
    Apr 2 at 12:34











  • I can't get the param that I set in the second screen.

    – aviyam ivgi
    Apr 2 at 20:50











  • @aviyamivgi is the value undefined ? and in shich event handler you tried to grab it ? cause if you're component is aleardy mounted, you 'll need to get the value inside your componentWillRecieveProps event

    – Hend El-Sahli
    Apr 2 at 20:54












  • I don get it ?? ... I meant to call these handlers inside your screen that you render by your TabNavigator like PaymentsScreen

    – Hend El-Sahli
    Apr 2 at 21:33













0












0








0







You could achieve that through getParam and setParam



class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
this.props.navigation.setParams( importantData );
;



class GraphsScreen extends Component
async componentDidMount()
const importantData = this.props.navigation.getParam('importantData');
;



getParam & getParam could solve the issue in the case you have in your question ... but I guess this use case is commonly managed by one of the popular global state management tools like redux or unstated as @Edison mentioned in his comment...






share|improve this answer















You could achieve that through getParam and setParam



class PaymentsScreen extends Component 
async componentDidMount()
const importantData = await GetDataFromServer();
this.props.navigation.setParams( importantData );
;



class GraphsScreen extends Component
async componentDidMount()
const importantData = this.props.navigation.getParam('importantData');
;



getParam & getParam could solve the issue in the case you have in your question ... but I guess this use case is commonly managed by one of the popular global state management tools like redux or unstated as @Edison mentioned in his comment...







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 26 at 4:26

























answered Mar 26 at 4:21









Hend El-SahliHend El-Sahli

1,4651 gold badge3 silver badges16 bronze badges




1,4651 gold badge3 silver badges16 bronze badges












  • This is doesn't work for me...

    – aviyam ivgi
    Apr 2 at 12:32











  • What error did you get ?

    – Hend El-Sahli
    Apr 2 at 12:34











  • I can't get the param that I set in the second screen.

    – aviyam ivgi
    Apr 2 at 20:50











  • @aviyamivgi is the value undefined ? and in shich event handler you tried to grab it ? cause if you're component is aleardy mounted, you 'll need to get the value inside your componentWillRecieveProps event

    – Hend El-Sahli
    Apr 2 at 20:54












  • I don get it ?? ... I meant to call these handlers inside your screen that you render by your TabNavigator like PaymentsScreen

    – Hend El-Sahli
    Apr 2 at 21:33

















  • This is doesn't work for me...

    – aviyam ivgi
    Apr 2 at 12:32











  • What error did you get ?

    – Hend El-Sahli
    Apr 2 at 12:34











  • I can't get the param that I set in the second screen.

    – aviyam ivgi
    Apr 2 at 20:50











  • @aviyamivgi is the value undefined ? and in shich event handler you tried to grab it ? cause if you're component is aleardy mounted, you 'll need to get the value inside your componentWillRecieveProps event

    – Hend El-Sahli
    Apr 2 at 20:54












  • I don get it ?? ... I meant to call these handlers inside your screen that you render by your TabNavigator like PaymentsScreen

    – Hend El-Sahli
    Apr 2 at 21:33
















This is doesn't work for me...

– aviyam ivgi
Apr 2 at 12:32





This is doesn't work for me...

– aviyam ivgi
Apr 2 at 12:32













What error did you get ?

– Hend El-Sahli
Apr 2 at 12:34





What error did you get ?

– Hend El-Sahli
Apr 2 at 12:34













I can't get the param that I set in the second screen.

– aviyam ivgi
Apr 2 at 20:50





I can't get the param that I set in the second screen.

– aviyam ivgi
Apr 2 at 20:50













@aviyamivgi is the value undefined ? and in shich event handler you tried to grab it ? cause if you're component is aleardy mounted, you 'll need to get the value inside your componentWillRecieveProps event

– Hend El-Sahli
Apr 2 at 20:54






@aviyamivgi is the value undefined ? and in shich event handler you tried to grab it ? cause if you're component is aleardy mounted, you 'll need to get the value inside your componentWillRecieveProps event

– Hend El-Sahli
Apr 2 at 20:54














I don get it ?? ... I meant to call these handlers inside your screen that you render by your TabNavigator like PaymentsScreen

– Hend El-Sahli
Apr 2 at 21:33





I don get it ?? ... I meant to call these handlers inside your screen that you render by your TabNavigator like PaymentsScreen

– Hend El-Sahli
Apr 2 at 21:33








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55347798%2fpassing-data-between-2-tabs%23new-answer', 'question_page');

);

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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현