将react-router链接与<a> tag

时间:2019-05-18 00:26:57

标签: html reactjs hyperlink react-router

How can I use an tag within that we can use from react-router?

For example,

<Link to='/some-path'>
  <a href="https://....">Text </a>
</Link>

Since Link is effectively an anchor tag too, HTML throws an error saying that an tag cannot be provided within another tag.

Any help would be appreciated.

0 个答案:

没有答案