Skip to content

Commit

Permalink
Fix typos in Fabric Native Components Introduction (#4408)
Browse files Browse the repository at this point in the history
  • Loading branch information
woxtu authored Dec 29, 2024
1 parent a94002d commit b5f11a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/fabric-native-components-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs/fabric-native-components-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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`.

Expand All @@ -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.
Expand Down

0 comments on commit b5f11a0

Please sign in to comment.