Skip to content
Source
Sign inSign up
TanStack/form

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

Send to my agent
OpenLeCarbonator(GitHub profile, opens in a new tab) opened this issue 1 comment

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.

  1. LeCarbonator(GitHub profile, opens in a new tab) added labelstype: docs

  2. LeCarbonator(GitHub profile, opens in a new tab) added labelsscope: react

  3. I'd like to take this — converting React docs and examples to use JSX children instead of the children={} prop for consistency.

Sign in to join this conversation.