This is my routes.js, I have a problem passing data which has been received in userProfiles, to userProfileDetail of that user. I don't want to do another API call in userProfileDetail, because there is already a call in userProfiles
const routes = {
component: Base,
childRoutes: [
{
path: '/profiles',
getComponent: (location, callback) => {
callback(null, userProfiles);
}
},
{
path: '/profile/:profile_id',
getComponent: (location, callback) => {
callback(null, userProfileDetail);
}
}
]
};
How I navigate is just via a
<Link to={/profile/${user._id}} /> in userProfiles, but how to pass from userProfiles to userProfileDetail?