Passing Functions to Components FAQ: document a pattern for class components
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
The Passing Functions to Components FAQ page discusses some strategies for passing parameters to the callbacks, out of which using data attributes on DOM elements for better performance is an addition to the ones described on the Handling Events docs.
I wrote about a similar pattern for class components, and was wondering if it would be a good addition to the FAQ page. (Of course, I'd love to know whether the things I say there are accurate, misinterpret the performance implications in any way, or generally sound like bad ideas.)
Tangentially, it may be a good idea to link to the FAQ from the Handling Events page? I was initially not aware there's extra information on the subject.
I must add that the React website is one of the best documentations I've ever read through, and in particular the FAQ section seems to include actual frequent questions :)
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 with the Passing Functions to Components FAQ and the Handling Events page, then compare the proposed class-component pattern in the linked react-recipes property-pattern.md. Check whether the pattern and its performance claims are accurate and decide whether the FAQ should document it and link to the Handling Events guidance. Done means the documentation changes and any cross-links are agreed and updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100