Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default icons of rating component cause RangeError: Maximum call stack size exceeded in nextjs 15 #840

Open
Bushuo opened this issue Nov 13, 2024 · 1 comment

Comments

@Bushuo
Copy link

Bushuo commented Nov 13, 2024

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;
@returnvoid
Copy link

returnvoid commented Dec 12, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants