From b5f11a01ba99fd5cb93413a42551e096eab364fb Mon Sep 17 00:00:00 2001 From: woxtu Date: Mon, 30 Dec 2024 06:18:47 +0900 Subject: [PATCH] Fix typos in Fabric Native Components Introduction (#4408) --- docs/fabric-native-components-android.md | 2 +- docs/fabric-native-components-ios.md | 4 ++-- .../version-0.76/fabric-native-components-android.md | 2 +- .../version-0.76/fabric-native-components-ios.md | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/fabric-native-components-android.md b/docs/fabric-native-components-android.md index f9eb3730007..04f828a6a69 100644 --- a/docs/fabric-native-components-android.md +++ b/docs/fabric-native-components-android.md @@ -335,7 +335,7 @@ It then overrides the `getName` function, which must return the same name used i The `createViewInstance` function is responsible to instantiate a new `ReactWebView`. -Then, the ViewManager needs to define how all the React's compnoents props will update the native view. In the example, you need to decide how to handle the `sourceURL` property that React will set on the `WebView`. +Then, the ViewManager needs to define how all the React's components props will update the native view. In the example, you need to decide how to handle the `sourceURL` property that React will set on the `WebView`. Finally, if the component can emit an event, you need to map the event name by overriding the `getExportedCustomBubblingEventTypeConstants` for bubbling events, or the `getExportedCustomDirectEventTypeConstants` for direct events. diff --git a/docs/fabric-native-components-ios.md b/docs/fabric-native-components-ios.md index 879e2a20f9d..b99a885956e 100644 --- a/docs/fabric-native-components-ios.md +++ b/docs/fabric-native-components-ios.md @@ -29,7 +29,7 @@ You should be careful about committing generated code to your repository. Genera ### 3. Write the `RCTWebView` -We need to prepare your iOS project using Xcode by completeing these **5 steps**: +We need to prepare your iOS project using Xcode by completing these **5 steps**: 1. Open the CocoPods generated Xcode Workspace: @@ -202,7 +202,7 @@ This code is written in Objective-C++ and contains various details: #### Add WebKit framework :::note -This step is only required because we are creating a Web view. Web components on iOS needs to be linked againt the WebKit framework provided by Apple. If your component doesn't need to access web-specific features, you can skip this step. +This step is only required because we are creating a Web view. Web components on iOS needs to be linked against the WebKit framework provided by Apple. If your component doesn't need to access web-specific features, you can skip this step. ::: A web view requires access to some features that Apple provides through one of the frameworks shipped with Xcode and the devices: WebKit. diff --git a/website/versioned_docs/version-0.76/fabric-native-components-android.md b/website/versioned_docs/version-0.76/fabric-native-components-android.md index e00ff9dff8f..c16228bb9d9 100644 --- a/website/versioned_docs/version-0.76/fabric-native-components-android.md +++ b/website/versioned_docs/version-0.76/fabric-native-components-android.md @@ -335,7 +335,7 @@ It then overrides the `getName` function, which must return the same name used i The `createViewInstance` function is responsible to instantiate a new `ReactWebView`. -Then, the ViewManager needs to define how all the React's compnoents props will update the native view. In the example, you need to decide how to handle the `sourceURL` property that React will set on the `WebView`. +Then, the ViewManager needs to define how all the React's components props will update the native view. In the example, you need to decide how to handle the `sourceURL` property that React will set on the `WebView`. Finally, if the component can emit an event, you need to map the event name by overriding the `getExportedCustomBubblingEventTypeConstants` for bubbling events, or the `getExportedCustomDirectEventTypeConstants` for direct events. diff --git a/website/versioned_docs/version-0.76/fabric-native-components-ios.md b/website/versioned_docs/version-0.76/fabric-native-components-ios.md index ce06dd8ff82..d2e3450afde 100644 --- a/website/versioned_docs/version-0.76/fabric-native-components-ios.md +++ b/website/versioned_docs/version-0.76/fabric-native-components-ios.md @@ -29,7 +29,7 @@ You should be careful about committing generated code to your repository. Genera ### 3. Write the `RCTWebView` -We need to prepare your iOS project using Xcode by completeing these **5 steps**: +We need to prepare your iOS project using Xcode by completing these **5 steps**: 1. Open the CocoPods generated Xcode Workspace: @@ -230,7 +230,7 @@ Update the `AppDelegate.mm` to make your application aware of our custom WebView @end ``` -This code override the `thirdPartyFabricComponents` method by obtainig a mutable copy of the dictionary of third party's components coming from other sources, like third party libraries. +This code override the `thirdPartyFabricComponents` method by obtaining a mutable copy of the dictionary of third party's components coming from other sources, like third party libraries. It then adds an entry to the dictionary with the name used in the Codegen specification file. In this way, when React requires to load a component with name `CustomWebView`, React Native will instantiate a `RCTWebView`. @@ -239,7 +239,7 @@ Finally, it returns the new dictionary. #### Add WebKit framework :::note -This step is only required because we are creating a Web view. Web components on iOS needs to be linked againt the WebKit framework provided by Apple. If your component doesn't need to access web-specific features, you can skip this step. +This step is only required because we are creating a Web view. Web components on iOS needs to be linked against the WebKit framework provided by Apple. If your component doesn't need to access web-specific features, you can skip this step. ::: A web view requires access to some features that Apple provides through one of the frameworks shipped with Xcode and the devices: WebKit.