Closed luukee closed 1 month ago
Figured it out myself. My project was using two different versions of react. To fix:
First check for multiple versions by running yarn list react
. This gave me:
├─ @material-tailwind/react@2.1.9
│ └─ react@18.2.0
└─ react@18.3.1
So I added resolutions
to my package.json:
"resolutions": {
"react": "^18.3.0",
"react-dom": "^18.3.0"
}
Reinstalled node modules:
rm -rf node_modules yarn.lock
yarn install
Good to go.
Thought I should mention this... Importing and using AccordionBody gives this Unhandled Runtime Error:
I can import Accordion & AccordionHeader and use them in the markup, but when I import AccordionBody and use it the above issue occurs.
Console error output:
Example component usage:
Packages:
** Similar issue with the Collapse element.