Skip to content
Advertisement

trying to implement Material Design Navbar in React

I’m scratching my head here trying to figure out why I can’t see the styling applied to my Navbar. I’ve installed all of the necessary modules but it’s not happening. My code is below. I was working on a custom Navbar but the material one is very slick so I wanted to try it instead.

Navbar code

JavaScript

Here’s the code from my App.js with said Navbar

JavaScript

Here’s my package JSON file with the dependencies.

JavaScript

Advertisement

Answer

When using MDB5, You should create MDBNavbarLink this way:

JavaScript

Or

JavaScript

Make sure that react-router-dom is installed in the project. If not, add it with npm i react-router-dom

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement