From e3cabbb08ccb4798ba59acd271203859848d3f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Fazekas?= Date: Sat, 29 Jun 2024 16:36:13 +0300 Subject: [PATCH 1/3] Add some more clarification about RCT_EXPORT_XXX They are a bit confusing as it seems to be required unless brdigeless mode is on, but properties are actually handled in updateProps. --- docs/fabric-native-components.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/fabric-native-components.md b/docs/fabric-native-components.md index f517da2..368ac3f 100644 --- a/docs/fabric-native-components.md +++ b/docs/fabric-native-components.md @@ -502,6 +502,8 @@ The most important call is to the `RCT_EXPORT_MODULE`, which is required to expo Then, you have to expose the `text` property for the Fabric Native Component. This is done with the `RCT_EXPORT_VIEW_PROPERTY` macro, specifying a name and a type. > [!Note] +> Unlike legacy native components, properties are actually handled via `updateProps` C++ code, see bellow. +> Those macros are needed for the bridge, With bidgeless mode you can ommit them. > There are other macros that can be used to export custom properties, emitters, and other constructs. You can view the code that specifies them [here](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Views/RCTViewManager.h). ##### RTNCenteredText.h From 46ebddcd0dfd8df7ed20664749a0a6bdefcc3d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Fazekas?= Date: Mon, 1 Jul 2024 13:16:43 +0300 Subject: [PATCH 2/3] Update docs/fabric-native-components.md Co-authored-by: Nicola Corti --- docs/fabric-native-components.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/fabric-native-components.md b/docs/fabric-native-components.md index 368ac3f..3a9e847 100644 --- a/docs/fabric-native-components.md +++ b/docs/fabric-native-components.md @@ -502,8 +502,8 @@ The most important call is to the `RCT_EXPORT_MODULE`, which is required to expo Then, you have to expose the `text` property for the Fabric Native Component. This is done with the `RCT_EXPORT_VIEW_PROPERTY` macro, specifying a name and a type. > [!Note] -> Unlike legacy native components, properties are actually handled via `updateProps` C++ code, see bellow. -> Those macros are needed for the bridge, With bidgeless mode you can ommit them. +> Unlike legacy native components, properties are actually handled via `updateProps` C++ code, see below. +> Those macros are needed for the bridge, With bidgeless mode you can omit them. > There are other macros that can be used to export custom properties, emitters, and other constructs. You can view the code that specifies them [here](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Views/RCTViewManager.h). ##### RTNCenteredText.h From e27f504d5fe864d57560d78bd1dc0bbd695417f8 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Thu, 4 Jul 2024 09:29:37 +0100 Subject: [PATCH 3/3] Update docs/fabric-native-components.md --- docs/fabric-native-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fabric-native-components.md b/docs/fabric-native-components.md index 3a9e847..7f61281 100644 --- a/docs/fabric-native-components.md +++ b/docs/fabric-native-components.md @@ -503,7 +503,7 @@ Then, you have to expose the `text` property for the Fabric Native Component. Th > [!Note] > Unlike legacy native components, properties are actually handled via `updateProps` C++ code, see below. -> Those macros are needed for the bridge, With bidgeless mode you can omit them. +> Those macros are needed for bridge compatibility. With bidgeless mode you can omit them entirely. > There are other macros that can be used to export custom properties, emitters, and other constructs. You can view the code that specifies them [here](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Views/RCTViewManager.h). ##### RTNCenteredText.h