I have two stack in my application
- Tab Navigator (main stack)
- Stack Navigator (app stack)
Stack Navigator elements
- Home Screen
- Detail Screen
- Login Screen
Tab Navigator elements
- Home Screen (Stack Navigor)
- Economy News
- Politic News
- Social News
I want to go Detail screen from Economy News, Politic News and Social News because I render the all news in these screens and when the user click the any new, must go to the Detail screen with new which clicked. I used navigate('Home', {screen: 'Detail', params: {id: new.ID}}); But it always render the previous new detail.
Also I tried
navigation.dispatch(
CommonActions.reset({
routes: [
{
name: 'Home',
},
{
name: 'Detail',
params: {
id: new.ID,
},
},
],
}),
);
But still it does not work I need to help about this issue I have tried so many things but always render the previous screen detail.