We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
className
composeRenderProps
Everywhere in the library we are shadowing the className variable in the callback function (2nd argument to composeRenderProps):
className={composeRenderProps(className, (className) => cn("group flex flex-col gap-2", className), )}
It's problematic because a lot of projects use ESLint no-shadow rule. Which generates many errors for each of these files
no-shadow
Same with this:
{composeRenderProps(children, (children) => ( <> {children} <ChevronDown aria-hidden="true" className="size-4 opacity-50" /> </> ))}
children is being shadowed, changing it to something like renderChildren won't trigger ESLint errors
children
renderChildren
examples are taken from Select component
Select
The text was updated successfully, but these errors were encountered:
The composeRenderProps isn't actually necessary at all in most cases and you can just do className={cn(...)}.
className={cn(...)}
Sorry, something went wrong.
No branches or pull requests
Everywhere in the library we are shadowing the
className
variable in the callback function (2nd argument tocomposeRenderProps
):It's problematic because a lot of projects use ESLint
no-shadow
rule. Which generates many errors for each of these filesSame with this:
children
is being shadowed, changing it to something likerenderChildren
won't trigger ESLint errorsexamples are taken from
Select
componentThe text was updated successfully, but these errors were encountered: