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 · 0 comments

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;
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

1 participant