Topic: Can't get the SideNav component to work
robnewton pro asked 4 years ago
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `SideNavPage`.I am using the link for the pro version from the gitlab in my package.json with my access token. I just copied and pasted the page from the documentation, so I haven't added my own information yet. I also just set up the pro version today, so I should be on the latest version. What is going wrong with it?
The docs you have used should be up to date and work fine.
But you said that, you have been sure that you have installed PRO, because Gradeint Buttons have been working.
Well, thanks to that I found that there is mistake in documentation. Gradient Buttons is a free component.
I assume, that you started with mdbreact free, that is why SideNav didn't work.
What is the stack of your project?
Do you use create-react-app application, or some custom boilerplate?
Have you imported `SideNavPage` to your index.js file?
I just had tested this snippet in fresh c-r-a and everything's ok.
Waiting for hearing from you
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: 4.7.1
- Device: MacBook Pro
- Browser: Google Chrome
- OS: macOS Mojave v10.14
- Provided sample code: Yes
- Provided link: No