Topic: TabPane - type is invalid -- expected a string but got: undefined.

jrr free asked 5 years ago


Hi,   I'm trying to use the last version 4.8.2 and I'm getting the error bellow, I tried with older versions and get the same error. I made a new project following this start guide https://mdbootstrap.com/react/5-min-quick-start/ and copy and past the first example here https://mdbootstrap.com/react/advanced/tabs/ and got the error 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 `TabsPage`. Check your code at Test.js:73. in TabsPage (at App.js:11) in div (at App.js:10) in App (at src/index.js:10)

Jakub Mandra staff answered 5 years ago


Oh, sorry, I didn't mention previously that MDB Free doesn't provide all components (there is an indicator button for PRO components in documentation). Tabs aren't available in free version. To enjoy all the possibilities of mdb please purchase MDB Pro.   Best, Jakub

jrr free answered 5 years ago


Well, your demo do not use the TabPane component.   Yes, I created a file, the Test.js, inside the Test.js is your code, which has the component name of "TabsPage", the code is equal your example, which has the default export and should work, I tested in a full system that I was trying to use MDB, got the same error.   Folow the code: https://github.com/jrrcdev/mdb-test

Jakub Mandra staff answered 5 years ago


Hi there, First thing, if you have installed package properly from .zip downloaded from here, you should see our demo App. Do you? Second thing, I can assume from error log, that you made separated file for TabsPage and didn't imported it to your App.   Fire away if I did not help.   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.7.1
  • Device: Any
  • Browser: Chrome 69.0.3497.100
  • OS: Windows 10 Pro - 1803
  • Provided sample code: No
  • Provided link: No