react-native
react-native copied to clipboard
Use compose to render Switch in Fabric
Summary: This change is a proof of concept to try Compose integration with RN component on Android by measuring and drawing Switch component through a Composable function.
To interface Composable nodes with the view system, we use a "classic" view interoperability layer to plug Compose-based Switch into existing ViewManager and propagate props and events as we do with “classic” views.
Fabric also requires initial measure during layout, which was implemented through custom background Recomposer and LayoutNode hacks to avoid creating full-blown view.
Differential Revision: D31657259
This pull request was exported from Phabricator. Differential Revision: D31657259
For reference: screencap + Flipper layout view

| Messages | |
|---|---|
| :book: |
:clipboard: Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: CATEGORY may be:
TYPE may be:
MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes. |
Generated by :no_entry_sign: dangerJS against ac9eb363b931756b4fe99422f6f4be4e9a727efb
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| ios | - | universal | n/a | -- |
Base commit: 0fccbd53af86083a8742a33282dc183d07eb27a2 Branch: main
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.