The React documentation and examples should use one consistent style for passing children. The proposed convention is to use JSX children between a component's tags instead of passing them through the children prop.
This convention should be applied consistently across:
- the documentation
- the examples.
A consistent style would make the material easier to scan and prevent examples from switching between equivalent forms without a clear reason.
Optionally, the documentation could include a hidden hint explaining that children={} and JSX children are semantically equivalent. The hint could also mention that ESLint can be configured to report inconsistent usage.
The React documentation and examples should use one consistent style for passing
children. The proposed convention is to use JSX children between a component's tags instead of passing them through thechildrenprop.This convention should be applied consistently across:
A consistent style would make the material easier to scan and prevent examples from switching between equivalent forms without a clear reason.
Optionally, the documentation could include a hidden hint explaining that
children={}and JSX children are semantically equivalent. The hint could also mention that ESLint can be configured to report inconsistent usage.