<Route exact path="/" component={Home} />
<Route path="/prices" component={Prices} />
<Route path="/calc" component={Calc} />
<Route path="/articles" component={Articles} />
<Route path="articles/:url" component={Article} />
</Switch>
——
<ul className="articles-list">
{data.map( (article, index) => <li key={index}><Link to={`/articles/:${article.url}`}>{article.title}</Link></li> )}
</ul>
<Route path="/articles/:url" component={Article} />
<Route exact path="/articles" component={Articles} />
<Link to={/articles/:${article.url}}> : Лишнее
Роутер и роут это разные вещи
Обсуждают сегодня