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
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
examples are taken from Select component
Everywhere in the library we are shadowing the
classNamevariable in the callback function (2nd argument tocomposeRenderProps):It's problematic because a lot of projects use ESLint
no-shadowrule. Which generates many errors for each of these filesSame with this:
childrenis being shadowed, changing it to something likerenderChildrenwon't trigger ESLint errorsexamples are taken from
Selectcomponent