Answer the question
In order to leave comments, you need to log in
How to send props through react-route?
There is some PublishedArticle.js from which you need to send props, which will be const article, to the PublishedArticlePage component, which is called via Route
function PublisedArticle(props) {
const article = props.article
return (
<Router history={history}>
<Link to='/publishedArticlePage'>
<SomeLinkContent/>
</Link>
<Route path='/publishedArticlePage' component={PublishedArticlePage}/>
</Router>
)}
export default PublisedArticle
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question