Answer the question
In order to leave comments, you need to log in
How to move to another screen using navigation and display the desired data on it from redux?
I am writing a react-native + redux application.
on the news screen, I get an array of news; map the array into the "news preview" component by clicking on which the "news detailed view" screen should open. all news are saved in the store
how to pull out the necessary data by clicking on "news preview" and open the screen with "news detailed view"?
Answer the question
In order to leave comments, you need to log in
well, here you have 2 options
1 option is by pressing you save the id of the clicked entry in the store, then go to the screen you need and knowing this id show detailed information about the news
or option 2 by clicking on the news you transfer the details of the news with the help of navigation along with the transition
this.props.navigation.navigate('Details', {
itemId: 86,
otherParam: 'anything you want here',
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question