Im trying to pass data between screens in my app. Currently I am using
\"react-native\": \"0.46.0\",
\"react-navigation\": \"^1.0.0-beta.11\"
<
I have developed an NPM package for send data from one component to other components. Please do check and use its easy to use.
React data navigation
import { DataNavigation } from 'react-data-navigation';
.
.
.
// For set the data you need to call setData(key, value) Function i.e.
// eg. DataNavigation.setData('name', 'Viren');
// it will set the 'Viren' as respect to 'name' key.
import { DataNavigation } from 'react-data-navigation';
.
.
.
// Here we want to get the name value, which you set in home component than
// console.log('Hey my name is' + DataNavigation.getData('name'));
// it will print in console : Hey my name is Viren.
Comment down for any help.