Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDBNavLink 'to' attribute issue

AB free asked 5 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 answered 5 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

  • ForumUser: 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
Tags