in Education by
Hello All,I am using react-navigation v3 for navigation purposes.I have created a tab navigator called TourPackagesTab.It consists of 2 screens,InternationalToursScreen and DomesticToursScreen. I fetch some data in InternationalToursScreen.The fetched data is also to be used in DomesticToursScreen. How do I pass the fetched data to DomesticToursScreen as it is inside tabNavigator? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Hi there you can send data through onPress events via params, for example: onPress={() => { this.props.navigation.navigate('Screen2', { data1: item.data1, data2: item.data2, }); }} Then on Screen2 you access it like this: const data = this.props.navigation.state.params; {data.data1} Also TabNavigators have an onPress event that you can use to perform functions, see more here

Related questions

0 votes
    This problem is only appearing on iOS. The application is built with react-native 0.57.7 and on ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    I have two activities in my project one activity is MainActivity and another is Main2activity, In Main2activity ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    I have two activities in my project one activity is MainActivity and another is Main2activity, In Main2activity ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 1, 2022 in Education by JackTerrance
0 votes
    I have two activities in my project one activity is MainActivity and another is Main2activity, In Main2activity ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 27, 2022 in Education by JackTerrance
0 votes
    I have two activities in my project one activity is MainActivity and another is Main2activity, In Main2activity ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 26, 2022 in Education by JackTerrance
0 votes
    I have two activities in my project one activity is MainActivity and another is Main2activity, In Main2activity ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 24, 2022 in Education by JackTerrance
0 votes
    I have a web/ios react-native project. On web this works without any issue, but on iOS I am getting an error ... user progress: writing string of >>${JSON.stringify(user.progress)}...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I have to download images to my iOS apps local file system and read them back. On my simulator I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 6, 2022 in Education by JackTerrance
0 votes
    How to pass data between react components?...
asked Dec 5, 2020 in Technology by JackTerrance
0 votes
    Hi I know it's a known issue about the auto height of webview in react native, and I have tried ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    Warning: Possible Unhandled Promise Rejection (id: 0) TypeError: Object is not a function (evaluating ' ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 3, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    my AndroidManifest.xml looks like this: and I get this error: * What went wrong: Execution failed for ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    I am using Firebase authentication and react-redux in my app. I added firebase.auth().onAuthStateChanged to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
...