links: React Native MOC
This guide helps to start creating the iOS side of Fabric Component
JS Spec
First, create the JS Spec in Flow/TypeScript. This Spec is picked up by Codegen and generates necessary cpp files that can be used for Type Safety on the Native Side
iOS
View Manager
The View Manager is responsible for exposing the iOS part of the component and its props to the JS side
Create a View Manager file MyComponentViewManager.mm
This file is mostly responsible for initialising the Native View
- Extend your interface with
RCTViewManager - Inside the implementation return a
viewand export necessary methods viaRCT_EXPORT_VIEW_PROPERTY
View
This is responsible for initialising the view and updating the props.
The three important methods are
componentDescriptorProviderinitWithFrameupdatePropsReactComponentViewProtocolclass
tags: fabric react-native iOS