Topic: MDB React 4.6.1 Carousel Error
cmykprnt pro asked 6 years ago
I just upgraded my MDB React Pro from 4.5 to 4.6.1.
I copy and paste one your Carousel samples from the Carousel section and from the Ecommerce section. They both cause my application to crash with this error message on my screen:
"Expected ref to be a function or a string."
And in the console I can see this error message:
[Error] The above error occurred in the <Carousel> component:
in Carousel (at LatestProducts.js:179)
in div
in Container (at LatestProducts.js:177)
in LatestProducts (created by Connect(LatestProducts))
in Connect(LatestProducts) (at EmployeeDashboard.js:12)
in div (at EmployeeDashboard.js:11)
in div (at EmployeeDashboard.js:10)
in div (at EmployeeDashboard.js:9)
in EmployeeDashboard (at Dashboard.js:23)
in div (at Dashboard.js:20)
in div (at Dashboard.js:19)
in Dashboard (created by Connect(Dashboard))
in Connect(Dashboard) (at requireAuth.js:27)
in Authenticate (created by Connect(Authenticate))
in Connect(Authenticate) (created by RouterContext)
in div (at StoreLayout.js:11)
in div (at StoreLayout.js:10)
in div (at StoreLayout.js:8)
in StoreLayout (created by RouterContext)
in div (at Layout.js:10)
in Layout (created by RouterContext)
in RouterContext (created by Router)
in Router (at index.js:19)
in Provider (at index.js:18)
in MuiThemeProvider (at index.js:17)
in App (at index.js:30)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
logCapturedError (bundle.js:172763)
captureError (bundle.js:173556)
renderRoot (bundle.js:173407)
performWorkOnRoot (bundle.js:174030)
performWork (bundle.js:173983)
requestWork (bundle.js:173894)
scheduleWorkImpl (bundle.js:173748)
enqueueSetState (bundle.js:169228)
setState (bundle.js:217304)
onStateChange (bundle.js:187636)
onStateChange
dispatch (bundle.js:219511)
(anonymous function) (bundle.js:218737:7808)
(anonymous function) (bundle.js:228995)
promiseReactionJob
So I don't know if I did something wrong (which I doubt) or it's a bug...
I'd appreciate it if you could help me out.
Thanks in advance!
Add comment
cmykprnt pro answered 6 years ago
Okay, I found the solution.
For whoever has the same question, you need to make sure that your react & react-dom version is at least 16.4.1!
Hope it helps.
Jakub Mandra staff commented 6 years ago
That's right! We are trying to stick to the newest versions of any technology we are working with. Thank your for posting! Best regards, Jakub from MDBFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Resolved
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags