From 887e9e498dfe66fb3de897c804d5893c52854474 Mon Sep 17 00:00:00 2001 From: Connor Mullins Date: Tue, 27 Jun 2023 09:06:57 -0700 Subject: [PATCH 1/3] Update backward-compatibility-fabric-components.md Ensure backwards-compat docs refer to all necessary code changes. https://github.com/reactwg/react-native-new-architecture/discussions/8#discussioncomment-6257033 --- .../backward-compatibility-fabric-components.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/the-new-architecture/backward-compatibility-fabric-components.md b/docs/the-new-architecture/backward-compatibility-fabric-components.md index 99f8d8b35c9..6e9d9a14a08 100644 --- a/docs/the-new-architecture/backward-compatibility-fabric-components.md +++ b/docs/the-new-architecture/backward-compatibility-fabric-components.md @@ -257,6 +257,8 @@ The same two lines should be added in the implementation file, as first and last The above snippet uses the same `RCT_NEW_ARCH_ENABLED` flag used in the previous [section](#dependencies-ios). When this flag is not set, Xcode skips the lines within the `#ifdef` during compilation and it does not include them into the compiled binary. The compiled binary will have a the `RNMyComponentView.o` object but it will be an empty object. +After wrapping the above components with a `#ifdef` pragma, you need to replicate the functionality of `RNMyComponentView.mm` inside `RNMyComponentViewManager.mm` to ensure the same functionality between architectures. For more information on how legacy components work, refer to [our documentation](https://reactnative.dev/docs/native-components-ios). + ### Android As we can't use conditional compilation blocks on Android, we will define two different source sets. This will allow to create a backward compatible TurboModule with the proper source that is loaded and compiled depending on the used architecture. From dd40081149098d6a300e82807c26298489b77780 Mon Sep 17 00:00:00 2001 From: Connor Mullins Date: Mon, 10 Jul 2023 12:39:45 -0500 Subject: [PATCH 2/3] Update docs/the-new-architecture/backward-compatibility-fabric-components.md Co-authored-by: Riccardo Cipolleschi --- .../backward-compatibility-fabric-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/the-new-architecture/backward-compatibility-fabric-components.md b/docs/the-new-architecture/backward-compatibility-fabric-components.md index 6e9d9a14a08..4fef56c2e7b 100644 --- a/docs/the-new-architecture/backward-compatibility-fabric-components.md +++ b/docs/the-new-architecture/backward-compatibility-fabric-components.md @@ -257,7 +257,7 @@ The same two lines should be added in the implementation file, as first and last The above snippet uses the same `RCT_NEW_ARCH_ENABLED` flag used in the previous [section](#dependencies-ios). When this flag is not set, Xcode skips the lines within the `#ifdef` during compilation and it does not include them into the compiled binary. The compiled binary will have a the `RNMyComponentView.o` object but it will be an empty object. -After wrapping the above components with a `#ifdef` pragma, you need to replicate the functionality of `RNMyComponentView.mm` inside `RNMyComponentViewManager.mm` to ensure the same functionality between architectures. For more information on how legacy components work, refer to [our documentation](https://reactnative.dev/docs/native-components-ios). +After wrapping the above components with a `#ifdef` pragma, you need to implement the component for the legacy architecture, following [the legacy Native Componente documentation](https://reactnative.dev/docs/native-components-ios). This is needed because the New Renderer works in a different way from the legacy one, and it is not able to follow the new code's paths of the New Renderer. ### Android From ed5ffcc60a85eac14f71ad343e66f15878eabd6c Mon Sep 17 00:00:00 2001 From: Connor Mullins Date: Thu, 20 Jul 2023 08:52:05 -0700 Subject: [PATCH 3/3] trim whitespace and fix typo --- .../backward-compatibility-fabric-components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/the-new-architecture/backward-compatibility-fabric-components.md b/docs/the-new-architecture/backward-compatibility-fabric-components.md index 4fef56c2e7b..ccd83bde29b 100644 --- a/docs/the-new-architecture/backward-compatibility-fabric-components.md +++ b/docs/the-new-architecture/backward-compatibility-fabric-components.md @@ -257,7 +257,7 @@ The same two lines should be added in the implementation file, as first and last The above snippet uses the same `RCT_NEW_ARCH_ENABLED` flag used in the previous [section](#dependencies-ios). When this flag is not set, Xcode skips the lines within the `#ifdef` during compilation and it does not include them into the compiled binary. The compiled binary will have a the `RNMyComponentView.o` object but it will be an empty object. -After wrapping the above components with a `#ifdef` pragma, you need to implement the component for the legacy architecture, following [the legacy Native Componente documentation](https://reactnative.dev/docs/native-components-ios). This is needed because the New Renderer works in a different way from the legacy one, and it is not able to follow the new code's paths of the New Renderer. +After wrapping the above components with a `#ifdef` pragma, you need to implement the component for the legacy architecture, following [the legacy Native Component documentation](https://reactnative.dev/docs/native-components-ios). This is needed because the New Renderer works in a different way from the legacy one, and it is not able to follow the new code's paths of the New Renderer. ### Android