Please see snapshot attached: Code Snippet
I'm trying to export this variable "email" from the 'List' screen, to the 'Account' screen without having to navigate to it as it is a bottomTabNavigator.
Any help would be very appreciated!
Here's the repo: GitHub Repo
CodePudding user response:
It depends on which sort of state management are you using. In case of redux you can simply have a state that you communicate between the screens or create a top level context with reducers hook to pass the data.
CodePudding user response:
some way you can handle that :
- use
reduxin your project for access to yourstatesin all of your project
for more info see this
this solution totally used in big project
- use
createContextto save your somepropsand you can access that in other Screen for more info see this
3.use global prop in project and you can set and get from that
for Example for set like that :
global.myProb=5;
and for get:
var m=global.myProb;
- use
AsyncStoragefor save some data . for more info see this
