Topic: React: NavLink with href to another page

0xcristianoff free asked 5 years ago


Expected behavior Instead of using <MDBNavLink to="/Blog">Clickme</MDBNavLink> to go to /Blog, I want to use MDBNavLink to open a page to another website by running this command

<MDBNavLink><a  rel="noopener noreferrer"
                target="_blank" href="https://medium.com/">Clickme</a></MDBNavLink>

Actual behavior I'm getting "you must specify to property". What's the correct way to open another page with the link? If I specify the "to" property and I click on the text it simply doesn't work, saying <a> can't be descendent of <a>

I also don't find documentation on how to do that.

Resources (screenshots, code snippets etc.)

None.


sage-wise free answered 5 years ago


The correct use is..

<MDBNavLink to="/" >My Daily</MDBNavLink>

you dont have to insert <a>



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.11.1
  • Device: Laptop
  • Browser: Google Chrome
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No
Tags