MDBNavbarLink and MDBSideNavLink delay when changes between


Topic: MDBNavbarLink and MDBSideNavLink delay when changes between pages

Jens Krieg pro premium priority asked 2 years ago

hi

Expected behavior When I switch from one page to another via the navbar links I expect a smooth transition with no moments where a blank page appears. By using in MDBNavBar or MDBSideNAvBar the react router navlinks components the transition occurs smoothly.

Actual behavior If I use the MDB components MDBNavbarLink or MDBSideNavLink I get a blank page for a moment so that the transition between pages no longer occurs smoothly.
I think it is related to the href tag. I also tried with the MDBNavbarBrand component and if I add an href I get the same delay. If I nest MDBNavbarBrand in a NavLink, delete the href and use the to="/" tag in the NavLink there is no more delay (but I get an error in the console because I actually nested two anchor tags).

do you have any suggestions?

best regards


Krzysztof Wilk staff commented 2 years ago

Hi!

You can use the tag property in the MDBNavbarBrand component to change the a tag to div or span and use to="/" instead of href. Alternatively, you can create your own element and add a .navbar-brand class.

If the above solutions don't help - could you create a simple repository on GitHub where I can check this problem?


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: Pro
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 4.2.0
  • Device: hp
  • Browser: chrome firefox
  • OS: ubuntu
  • Provided sample code: No
  • Provided link: No