Rules
no-children-to-array
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
core
recommended
recommended-typescript
recommended-type-checked
What it does
Prevents the use of Children.toArray
from the react
package.
Using Children.toArray
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.count
from thereact
package.no-children-for-each
Prevents the use ofChildren.forEach
from thereact
package.no-children-map
Prevents the use ofChildren.map
from thereact
package.no-children-only
Prevents the use ofChildren.only
from thereact
package.