Skip to content

[0.81] Fixed Switch component for Legacy Arch #1150

@cipolleschi

Description

@cipolleschi

Target Branch

0.81

Link to commit or PR to be picked

facebook/react-native#54155

Description

The switch component got broken on Legacy Arch after facebook/react-native#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 facebook/react-native#53537

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type Pick RequestPick requests to include commits inside a React Native release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions