Skip to content

Conversation

cipolleschi
Copy link
Contributor

@cipolleschi cipolleschi commented Oct 14, 2025

Summary:

The switch component got broken on Legacy Arch after #53067. That's because the React runtime does not know anymore how big are the switches.

On the new arch, we implemented a way for the native platform to inform React about the switch size, but we forgot to implement the same mechanism in the Legacy Arch.

React Native 0.81 has to support the Legacy Arch anyway, so this PR implements the same mechanism to inform React about the size of the Switch when running on the legacy arch.

This should fix #53537

Changelog:

[iOS][Fixed] - Fix Switches on the legacy arch

Test Plan:

Tested on RNTester, running the legacy arch.

--- Before After
iOS 18 Simulator Screenshot - iPhone 17 Pro - 2025-10-14 at 13 49 15 Simulator Screenshot - iPhone 17 Pro - 2025-10-14 at 13 47 20
iOS 26 Simulator Screenshot - iPhone 17 Pro - 2025-10-14 at 13 45 39 Simulator Screenshot - iPhone 17 Pro - 2025-10-14 at 13 46 01

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 14, 2025
@cipolleschi cipolleschi changed the base branch from main to 0.81-stable October 14, 2025 17:58
@cipolleschi cipolleschi marked this pull request as ready for review October 14, 2025 17:58
@gontovnik
Copy link
Contributor

Thank you! That solved our issue 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner Pick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch component does not work

4 participants