microsoft / microsoft/fluentui-react-native

`componentRef` type doesn't allow forwarded refs.

Open
#2,283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs: Triage :mag:
Dominant language
TypeScript
Stars
1.4k
Forks
179
Avg merge
16h 17m
Merged PRs (30d)
30

Description

Willing to submit a PR to fix?
  • I am willing to submit a PR to fix
Requested priority

Low

Products/applications affected

All FURN components

Package version(s)
OS version(s)

No response

Platform
  • iOS
  • macOS
  • win32
  • windows
  • android
Xcode version

No response

Please provide a reproduction of the bug

See https://github.com/microsoft/fluentui-react-native/pull/2246#discussion_r997411535

You can't pass a forwardedRef to a componentRef, because its typescript type is wrong. I mean, you can, but you need to suppress typescript warnings.

Actual behavior

No response

Expected behavior

No response

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 with the discussion in pull request 2246, especially the referenced comment, and trace the TypeScript definition of componentRef used by FURN components. Confirm that a forwarded ref can be passed without suppressing TypeScript warnings, then run the relevant type checks to verify the corrected type.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.