I am going from component A to component B via routing and I need to pass prop to A when user clicks on the windows back button while on component B. Is there any way of doing this? I am using React's history.push to navigate between components.
You can create a service (it's a singleton) to share state together.
See my example project at here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.