Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cipolleschi committed Oct 21, 2024
1 parent 4bb892d commit d03b4eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/fabric-native-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import {FabricNativeComponentsAndroid,FabricNativeComponentsIOS} from './\_fabri

# Native Fabric Components

If you want to build _new_ React Native Components that wraps around a [Host Component](https://reactnative.dev/architecture/glossary#host-view-tree-and-host-view) like a [UIButton](https://developer.apple.com/documentation/uikit/uibutton?language=objc) on iOS or a special kind of [CheckBox](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckBox) on Android, you should use a Fabric Native Component.
If you want to build _new_ React Native Components that wraps around a [Host Component](https://reactnative.dev/architecture/glossary#host-view-tree-and-host-view) like a [UIButton](https://developer.apple.com/documentation/uikit/uibutton?language=objc) on iOS or a custom kind of [CheckBox](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckBox) on Android, you should use a Fabric Native Component.

This guide will show you how to build Fabric Native Component, by implementing a simple centered text component. The steps to doing this are:
This guide will show you how to build Fabric Native Component, by implementing a centered text component. The steps to doing this are:

1. Define a JavaScript specification using Flow or TypeScript.
2. Implement the Native code.
3. Use the Component in an App.

## Creating the Fabric Native Centered Text Component

You're going to need a simple application to use the component:
You're going to need an application to use the component:

```bash
npx @react-native-community/cli@latest init Demo --install-pods false
Expand Down Expand Up @@ -95,7 +95,7 @@ export default (codegenNativeComponent<NativeProps>(
</TabItem>
</Tabs>

As with Turbo Native Modules, you're able to have multiple specification files in the `js/` directory. For more information about the types you can use, and the platform types these map to see the [appendix](/appendix#ii-codegen-typings).
As with Turbo Native Modules, you're able to have multiple specification files in the `js/` directory. For more information about the types you can use, and the platform types these map to see the [appendix](/appendix.md).

## 2. Configure the Component for Codegen

Expand Down
2 changes: 1 addition & 1 deletion docs/turbo-native-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To make this work on mobile, we need to use Android and iOS APIs:
React Native provides a tool called [Codegen](/the-new-architecture/what-is-codegen.md), which takes a specification written in TypeScript or Flow and generates platform specific code for Android and iOS. The specification declares the methods and data types that will pass back and forth between your native code and the React Native JavaScript runtime. A Turbo Native Module is both your specification, the native code you write, and the Codegen interfaces generated from your specification.

:::info
You can see all of the types you can use in your specification and the native types that are generated in the [Appendix](/appendix.md#ii-codegen-typings) documentation.
You can see all of the types you can use in your specification and the native types that are generated in the [Appendix](/appendix.md) documentation.
:::

Here is an implementation of the `localStorage` specification:
Expand Down

0 comments on commit d03b4eb

Please sign in to comment.