Rules
no-children-for-each
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
corerecommendedrecommended-typescriptrecommended-type-checked
What it does
Prevents the use of Children.forEach from the react package.
Using Children is uncommon and can lead to fragile code. See common alternatives.
Examples
Failing
Implementation
Further Reading
See Also
no-children-count
Prevents the use ofChildren.countfrom thereactpackage.no-children-map
Prevents the use ofChildren.mapfrom thereactpackage.no-children-only
Prevents the use ofChildren.onlyfrom thereactpackage.no-children-to-array
Prevents the use ofChildren.toArrayfrom thereactpackage.