[v2] Use consistent children syntax in React documentation and examples
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 682
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 7
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the React documentation and examples, then search them for uses of the children prop and JSX children syntax. Update the applicable material to consistently use JSX children between component tags, and consider the optional hidden equivalence and ESLint hint. Done means the React documentation and examples no longer switch styles without a clear reason.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100