reactjs / reactjs/react.dev

Docs update request: Forwarding multiple refs

Open
#4,580 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

Hello!

I have found a variety of resources on the web describing ways to forward multiple refs to a child component so they can be accessed by a parent component:

Would it be possible to add a section to the official docs which describes what is going on in these examples? I think that these examples use the behavior of useRef as described in the useRef docs, but I'm honestly not sure. I think an official example of this would be very helpful.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the linked examples with the React useRef documentation referenced in the issue. Determine how the official docs organize ref guidance, then add a section and example explaining forwarding multiple refs; done means the behavior and example are clearly documented in the appropriate React docs.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.