MDBNavLink 'to' attribute issue


Topic: MDBNavLink 'to' attribute issue

AB asked 6 years ago

Expected behavior

To navigate within a page to a section or opening a new page, with MDBNavLink 'to' attribute.

Actual behavior

Using the 'to' attribute to redirect to a page or section on a page, gives a blank page after clicking the link/tab.

Nav.Link from react-bootstrap works fine with 'href' attribute

Resources (screenshots, code snippets etc.)

Code examples used from

  • MDBReact Navbar/Nav examples in Navigation section and
  • E-commerce components plugin of Checkout panel

Jakub Mandra staff premium answered 6 years ago

Hello,

MDBReact's Navigation is based on react-router-dom v.4.3.1 currently. But r-r-d does not provide scrolling, to smoothly scroll around the page you can use SmoothScroll component https://mdbootstrap.com/docs/react/advanced/scroll/

You mentioned that you get blank pages while using navigation. If there are any errors just remove react-router-dom from your package.json (it will use dependency from mdbreact).

We will inform about the upgrade.

Best,

Jakub


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
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.11.1
  • Device: Dell PC
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No