Topic: React: NavLink with href to another page
0xcristianoff asked 6 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 answered 6 years ago
The correct use is..
<MDBNavLink to="/" >My Daily</MDBNavLink>
you dont have to insert <a>
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.11.1
- Device: Laptop
- Browser: Google Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No