New Architecture for React Native for Windows · Issue #12042 · microsoft/react-native-windows (original) (raw)
This issue is a hub for the various internal workstreams underway to bring the current "Paper" implementation of React Native on Windows to be replaced with a Fabric implementation. For information for how to consume this, start here.
About Fabric
Fabric is the new rendering system for React Native, designed to share more rendering logic cross-platform in C++. RNW's existing Paper renderer is built on XAML, with various parts dropping down into native Composition as need be; the new Fabric renderer will target Composition from the start, but with the ability to host XAML islands within.
Apps on the new architecture will be Win32 by default (This is a change from the Paper architecture where apps were UWP by default). The move away from UWP was a decision made to stay in alignment with the new WinAppSDK and WinUI3 which support Win32 apps (See here for more information). For our customers with UWP RNW apps, we will have clear migration instructions out once we reach official support for Fabric.
Can I Try It?
Yes! Start here. At this time we are ready for some people to start trying out Fabric on Windows, but we know it's not ready for everyone's needs. Be warned that there are still significant gaps in both the functionality and the developer experience. If you are an early adopter who is comfortable with an unpolished experience and wants to try intermediate builds, you can try that out here. However, understand that documentation will be thin, and please consult all of the below lists for what is not yet implemented before making any bug reports. As we progress further into our milestones the level of support will increase.
Milestones
Milestone | Milestone Nickname | Milestone Description |
---|---|---|
☑️ M0 | Proof of Concept | Internal contributors can manually create a Win32 app that renders JSX using Composition |
☑️ M1 | Experimental | User can successfully initialize, build, and run a React Native Windows app on the new architecture. User can use the most common props/API’s.User can use the most common accessibility props/API’s. User can observe basic accessibility support within their app.User will not have access to full API parity with Paper.User can use community modules within their app.User cannot use community modules with native UI within their app. |
🔜 M2 | 80% Parity and Accessibility | User can use 80% props/API’s that were supported on Paper. User can use 90% accessibility props/API’s that were supported on Paper. User can observe compliant/delightful accessibility support within their app. |
🔜 M3 | Ready for Modules | User can use the subset of community modules with native UI which have support for Fabric on Windows. |
⬜ M4 | New Default (Fabric now officially in support) | User can use some community modules with native UI which had been supported on Paper.User can view documentation for the new architecture on the React Native Windows website. Platform will be validated against most common app scenarios. |
⬜ M5 | Parity with Paper | User can use all props/API’s that were supported on Paper. Platform will be validated against all app scenarios.Paper architecture will be deprecated; Fabric will be the new default. |
⬜ M6 | Deprecate Paper | Paper architecture will be deprecated. |
Host Component Parity
(this table last updated April 2024, more detail available through logged issues on GitHub)
Priority | Component | Available | Properties |
---|---|---|---|
0 | View | ✅ | 98% |
0 | Text | ✅ | 86% |
0 | Image | ✅ | 100% |
0 | TextInput | ✅ | 59% |
1 | ScrollView | ✅ | 44% |
1 | Modal | ✅ | 64% |
2 | ActivityIndicator | ✅ | 100% |
2 | Switch | ✅ | 100% |
2 | RefreshControl | 🟥 | 28% |
Overall, if you include inherited View props and everything, Fabric is currently at 77% parity relative to Paper.
Host Components are the core RN primitive components directly backed by native UI. This table tracks our progress to reach parity in Fabric (Composition) with our Paper (XAML) implementation. See the parity tracking issue here
Paper Parity
Note that Paper itself never reached 100% parity. So 100% completion in the table above represents reaching 100% of what Paper accomplished, which is represented here:
Component | Completed % |
---|---|
View | 79% (116/147) |
Text | 72% (111/155) |
Image | 77% (151/196) |
TextInput | 72% (165/230) |
ScrollView | 69% (143/208) |
Modal | 57% (41/72) |
ActivityIndicator | 78% (117/150) |
Switch | 79% (121/154) |
RefreshControl | 74% (116/156) |
Track key issues
- Host Components in RNW have parity between Paper and Fabric renderers #11135
- Migrate from react-native-windows-init to react-native init-windows for new RNW projects #11920
- Enable creation of a new Fabric app from template via the CLI #11908
- Make Hermes the default JS engine #6136
- Ensure XAML controls can be hosted within a Fabric app's Composition tree #11907
- E2E testing for Fabric #11422
- Accessibility for Fabric #11898
- Modal component parity for Fabric #11157
- Flyout/Popup components for Fabric #11921
- Migrate (or fork) samples from Paper to Fabric react-native-windows-samples#862
- Migrate Supported Community Modules to Fabric #12027
- New apps created against 0.77+ should default to the new architecture #13683
- Enable creation of a new Fabric app from template via the CLI #11908
- Gallery on Fabric react-native-gallery#384