You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface files have the same name as that of the Turbo Native Module and contain methods to initialize the JSI interface.
125
118
126
119
The implementation files, instead, have the `-generated` suffix and contain the logic to invoke the native methods from JS and vice-versa.
127
120
128
121
### Fabric Native Components
129
122
130
-
<<<<<<< HEAD
131
-
The content of each Fabric Component folder contains several files. The basic element for a Fabric Component is the `ShadowNode`: it represents a node in the React abstract tree. The `ShadowNode` represents a React entity; therefore, it could need some props, which are defined in the `Props` files and, sometimes, an `EventEmitter`, defined in the corresponding file.
132
-
||||||| parent of 1f97265d (Clarify New Architecture Terminology)
133
-
The content of each Fabric Component folder contains several files. The basic element for a Fabric Componenent is the `ShadowNode`: it represents a node in the React absract tree. The `ShadowNode` represents a React entity, therefore it could need some props, which are defined in the `Props` files and, sometimes, an `EventEmitter`, defined in the corresponding file.
134
-
=======
135
-
The content of each Fabric Native Component folder contains several files. The basic element for a Fabric Componenent is the `ShadowNode`: it represents a node in the React absract tree. The `ShadowNode` represents a React entity, therefore it could need some props, which are defined in the `Props` files and, sometimes, an `EventEmitter`, defined in the corresponding file.
The content of each Fabric Native Component folder contains several files. The basic element for a Fabric Native Component is the `ShadowNode`: it represents a node in the React abstract tree. The `ShadowNode` represents a React entity; therefore, it could need some props, which are defined in the `Props` files and, sometimes, an `EventEmitter`, defined in the corresponding file.
138
124
139
-
Additionally, the **Codegen** also creates a `ComponentDescriptor.h` and an `RCTComponentViewHelpers.h` files: the first one is used by React Native and Fabric to properly get a reference to the Native Component, while the latter contains some helper methods and protocols that can be implemented by the Native View to properly respond to JSI invocations.
125
+
Additionally, the **Codegen** also creates a `ComponentDescriptor.h` and an `RCTComponentViewHelpers.h` files: the first one is used by React Native and Fabric to properly get a reference to the Fabric Native Component, while the latter contains some helper methods and protocols that can be implemented by the Native View to properly respond to JSI invocations.
140
126
141
127
For further details about how Fabric works, have a look at the [Renderer](/architecture/fabric-renderer) section.
142
128
143
129
### RCTThirdPartyFabricComponentsProvider
144
130
145
-
<<<<<<< HEAD
146
-
These are interface and implementation files for a registry. React Native uses this registry at runtime to retrieve the right class for a required Fabric Component. Once React Native has a handle to that class, it can instantiate it.
147
-
||||||| parent of 1f97265d (Clarify New Architecture Terminology)
148
-
These are an interface and an implementation files for a registry. React Native uses this registry at runtime to retrieve the right class for a required Fabric Component. Once React Native has an handle to that class, it can instantiate it.
149
-
=======
150
-
These are an interface and an implementation files for a registry. React Native uses this registry at runtime to retrieve the right class for a required Fabric Native Component. Once React Native has an handle to that class, it can instantiate it.
These are interface and implementation files for a registry. React Native uses this registry at runtime to retrieve the right class for a required Fabric Native Component. Once React Native has a handle to that class, it can instantiate it.
153
132
154
133
# Android
155
134
@@ -166,14 +145,7 @@ After that, you can navigate into the `SampleApp/android` folder and run:
166
145
./gradlew generateCodegenArtifactsFromSchema
167
146
```
168
147
169
-
<<<<<<< HEAD
170
-
These tasks invoke the `generateCodegenArtifactsFromSchema` on all the the imported projects of the app (the app and all the node modules which are linked to it). It generates the code in the corresponding `node_modules/<dependency>` folder. So, for example, if you have a Fabric Component whose node module is called `my-fabric-component`, the generated code is located in the `SampleApp/node_modules/my-fabric-component/android/build/generated/source/codegen` path.
171
-
||||||| parent of 1f97265d (Clarify New Architecture Terminology)
172
-
This tasks invokes the `generateCodegenArtifactsFromSchema` on all the the imported projects of the app (the app and all the node modules which are linked to it). It generates the code in the corresponding `node_modules/<dependency>` folder. So, for example, if you have a Fabric Component whose node module is called `my-fabric-component`, the generated code is located in the `SampleApp/node_modules/my-fabric-component/android/build/generated/source/codegen` path.
173
-
=======
174
-
This tasks invokes the `generateCodegenArtifactsFromSchema` on all the the imported projects of the app (the app and all the node modules which are linked to it). It generates the code in the corresponding `node_modules/<dependency>` folder. So, for example, if you have a Fabric Native Component whose node module is called `my-fabric-component`, the generated code is located in the `SampleApp/node_modules/my-fabric-component/android/build/generated/source/codegen` path.
These tasks invoke the `generateCodegenArtifactsFromSchema` on all the the imported projects of the app (the app and all the node modules which are linked to it). It generates the code in the corresponding `node_modules/<dependency>` folder. So, for example, if you have a Fabric Native Component whose node module is called `my-fabric-component`, the generated code is located in the `SampleApp/node_modules/my-fabric-component/android/build/generated/source/codegen` path.
177
149
178
150
## The Generated Code
179
151
@@ -243,14 +215,7 @@ codegen
243
215
244
216
Java can't interoperate seamlessly with C++ as Objective-C++ does. To work properly, **Codegen** creates some bridging between the Java and the C++ world in the `jni` folder, where the Java Native Interfaces are defined.
245
217
246
-
<<<<<<< HEAD
247
-
Notice that both TurboModules and Fabric Components come with two build file descriptors: the `Android.mk` and the `CMakeLists.txt`. These are used by the Android app to actually build the external modules.
248
-
||||||| parent of 1f97265d (Clarify New Architecture Terminology)
249
-
Notice that both TurboModules and Fabric Components comes with two build file descriptors: the `Android.mk` and the `CMakeLists.txt`. These are used by the Android app to actually build the external modules.
250
-
=======
251
-
Notice that both Turbo Native Modules and Fabric Native Components comes with two build file descriptors: the `Android.mk` and the `CMakeLists.txt`. These are used by the Android app to actually build the external modules.
Notice that both Turbo Native Modules and Fabric Native Components come with two build file descriptors: the `Android.mk` and the `CMakeLists.txt`. These are used by the Android app to actually build the external modules.
254
219
255
220
### Turbo Native Module
256
221
@@ -264,11 +229,4 @@ The **Codegen** for a Fabric Native Component contains a `MyFabricComponentManag
264
229
265
230
Then, there is a layer of JNI C++ files that are used by Fabric to render the components. The basic element for a Fabric Component is the `ShadowNode`: it represents a node in the React abstract tree. The `ShadowNode` represents a React entity; therefore it could need some props, which are defined in the `Props` files and, sometimes, an `EventEmitter`, defined in the corresponding file.
266
231
267
-
<<<<<<< HEAD
268
-
The **Codegen** also creates a `ComponentDescriptor.h`, which is required to get a proper handle on the Fabric Component.
269
-
||||||| parent of 1f97265d (Clarify New Architecture Terminology)
270
-
The **Codegen** also creates a `ComponentDescriptor.h` which is required to get a proper handle to the Fabric Component.
271
-
=======
272
-
The **Codegen** also creates a `ComponentDescriptor.h` which is required to get a proper handle to the Fabric Native Component.
0 commit comments