Topic: Attempted import error: 'MDBCarouselInner' is not exported from 'mdb-react-ui-kit'

Rishi Purwar free asked 1 week ago


I'm building a testimonial slider using the mdb-react-ui-kit but I'm getting this error message: Attempted import error: 'MDBCarouselInner' is not exported from 'mdb-react-ui-kit'.

Code sandbox link: https://codesandbox.io/s/intelligent-jang-1pzotz?file=/src/App.js

Anyone please help me with this issue!


mlazaru staff answered 1 week ago


Please remove MDBCarouselInner import and get rid of this component from the code. There must be an error in the documentation, you shouldn't use it. We're going to fix it soon.

https://codesandbox.io/s/inspiring-mcclintock-qvk1qi?file=/src/App.js

Correct Carousel structure is like:

<MDBCarousel>
  <MDBCarouselItem/>
  <MDBCarouselItem/>
  <MDBCarouselItem/>
</MDBCarousel>

Rishi Purwar free commented 1 week ago

@mlazaru Thanks for your answer, but after removing the MDBCarouselInner import, it is not showing anything on the browser window.

https://codesandbox.io/s/intelligent-jang-1pzotz?file=/src/App.js


mlazaru staff commented 1 week ago

Well, it looks like Carousel has some problems in this case, because MDBCarouselItem must have a src attribute, and it creates an <img/> tag automatically. It needs some changes to increase its usability.

I've prepared a working workaround. It's far from perfection, but maybe you will find something useful.https://codesandbox.io/s/new-thunder-tu9rk9?file=/src/App.js


Rishi Purwar free commented 6 days ago

Your workaround works fine for me, but it's not showing anything on the smaller screen size. Any suggestions on How I can fix this issue?


mlazaru staff commented 6 days ago

This could probably be done with additional code and styles, but I'm afraid it would be quite complicated and unstable. I would advise waiting until we fix it.


Rishi Purwar free commented 6 days ago

Ok, thanks for your help!



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: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB5 6.0.0
  • Device: Macbook Air m1
  • Browser: Chrome
  • OS: MacOs
  • Provided sample code: Yes
  • Provided link: Yes