Skip to content

extend iOS ref rewriting test cases - #149

Merged
RyanCommits merged 1 commit into
masterfrom
ryanwang/extend-ios-rewrite-tests
Mar 27, 2026
Merged

RyanCommits merged 1 commit into
masterfrom
ryanwang/extend-ios-rewrite-tests

Conversation

@RyanCommits

Copy link
Copy Markdown
Contributor

Added it.failing test: custom component with FS attributes does not have phantom ref injected into its props

The plugin currently injects a synthetic ref on any element with FS attributes, including plain function components that don't forward refs to a native host instance. For these components, sharedRefWrapper is a no-op (no native view to read fs attributes to), and the injected ref leaks into ...rest spreads, potentially overriding legitimate child refs.

The correct behavior is to only inject on components that forward refs to native host instances. Reliably detecting this at Babel transform time is non-trivial, so this is left as a known issue. The it.failing test documents the intended behavior and we can choose to investigate in the future.

@JoshMiers-FS JoshMiers-FS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RyanCommits
RyanCommits merged commit 18be919 into master Mar 27, 2026
2 checks passed
@RyanCommits
RyanCommits deleted the ryanwang/extend-ios-rewrite-tests branch March 27, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants