Skip to content

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Dec 13, 2022

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

While implementing Fabric for React Native macOS, we created a few new shim classes in RCTUIKit that we could potentially use in our paper implementation as well. This change extends the simple RCTUISwitch shim to implement what we need for it to work on Paper (aka, use it in RCTSwitch). The end result is a few less macOS diffs and overall cleaner code in my opinion =)

Changelog

[macOS] [Chenged] - Use RCTUISwitch shim for RCTSwitch

Test Plan

Test page still works fine.

Screen.Recording.2022-12-14.at.1.07.35.PM.mov

@Saadnajmi Saadnajmi changed the title [Draft / RFC] Use RCTUISwitch shim in Paper implementation Use RCTUISwitch shim in Paper (RCTSwitch) Dec 14, 2022
@Saadnajmi Saadnajmi marked this pull request as ready for review December 14, 2022 21:11
@Saadnajmi Saadnajmi requested a review from a team as a code owner December 14, 2022 21:11
@Saadnajmi Saadnajmi linked an issue Dec 14, 2022 that may be closed by this pull request
@Saadnajmi Saadnajmi merged commit 4b32d87 into microsoft:main Dec 15, 2022
@Saadnajmi Saadnajmi deleted the f2p branch January 15, 2023 23:46
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Feb 13, 2023
* Use RCTUISwitch for paper

* More diffs removed

* Ue typedef

* Update RCTUIKit.h

* PR feedback
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.

Investigate using new RCTUI* shims for paper

2 participants