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
redux
in your project for access to yourstates
in all of your project
for more info see this
this solution totally used in big project
- use
createContext
to save your someprops
and 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
AsyncStorage
for save some data . for more info see this