Default icons of rating component cause `RangeError: Maximum call stack size exceeded` in nextjs 15
When rendering the theme provider as a client component it seems something different is done inside deepmerge that causes infinite recursion.
Repro: inside a client component
"use client"
import theme from "@material-tailwind/react/theme";
import combineMerge from "@material-tailwind/react/utils/combineMerge";
import deepmerge from "deepmerge";
deepmerge(theme, {}, { arrayMerge: combineMerge });
When the same is done in the server context it somehow works.
Setting those two properties to null fixes the issue, but it would be nice if you could fix it internally.
theme.rating.defaultProps.ratedIcon = null;
theme.rating.defaultProps.unratedIcon = null;
Any news about this issue? I just bought the package Designer+Developer to find out that I can't integrate it with my new app Nextjs 15.0.3. Even the ready to use example: Next.js + Supabase is throwing this error out of the box. This example is using "next": "latest".
⨯ RangeError: Maximum call stack size exceeded at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) at Array.forEach (<anonymous>) { digest: '448623329' }
Thank you
+1
+1
Upgrade to v3 and migrate the code following the guide https://www.material-tailwind.com/docs/v3/react/migration/v3. v3 is still in beta, but I found this to fit my needs best.
+1