React Navigation - How to pass data across different screens in TabNavigator?

后端 未结 5 1952
野的像风
野的像风 2021-01-14 06:17

I have a TabNavigator, and in each tab is a StackNavigator. Inside the StackNavigator, I have screens. The screens in each Tab do not call each other directly; the TabNaviga

5条回答
  •  感情败类
    2021-01-14 06:59

    Setting props did not work when passing data across different tabs. I even tried playing with AsyncStorage, trying to save and retrieve them in different tabs.

    I ended up using Redux to save my states, and that has worked well so far.

提交回复
热议问题