Skip to content

[v2] Use consistent children syntax in React documentation and examples #2304

Description

@LeCarbonator

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: reactThis issue specifically affects the react adapter.type: docsThis issue is related to documentation, or lack thereof.v2This issue affects v2 as well.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions