Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clean up new arch docs #3332

Merged
merged 2 commits into from Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/new-architecture-library-intro.md
Expand Up @@ -18,7 +18,7 @@ The JavaScript specs serve as the source of truth for the methods that are provi
Using a **typed** spec file allows you to be intentional and declare all the input arguments and outputs of your native module’s methods.

:::info
Currently, this guide is written under the assumption that you will be using [Flow](https://flow.org/). The `react-native-codegen` package is also currently working only with the Flow source as an input. **TypeScript** support is in beta right now.
**TypeScript** support is in beta right now.
:::

To adopt the New Architecture, you start by creating these specs for your native modules and native components. You can do this prior to actually migrating to the New Architecture: the specs will be used later on to generate native interface code for all the supported platforms as a way to enforce uniform APIs across platforms.
Expand Down Expand Up @@ -152,7 +152,7 @@ If your existing native module has methods with the same name on multiple platfo

<!-- alex ignore master -->

[Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) is a feature of the React Native CLI that simplifies the installation of third-party React Native libraries. Instructions to enable _autolinking_ are available at https://github.com/react-native-community/cli/blob/master/docs/autolinking.md.
[Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) is a feature of the React Native CLI that simplifies the installation of third-party React Native libraries. Instructions to enable _autolinking_ are available in the [React Native CLI docs](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).

### Android

Expand Down Expand Up @@ -220,9 +220,9 @@ Codegen can be configured in the `package.json` file of your Library. Add the fo

Android also requires to have the [React Gradle Plugin properly configured](new-architecture-app-intro#android-specifics) in your app.

## Preparing your JavaScript Codebase for the new React Native Renderer (Fabric)
kelset marked this conversation as resolved.
Show resolved Hide resolved
## Preparing your JavaScript Codebase for Fabric

The new renderer, also known as Fabric, doesn’t use the UIManager, so direct calls to UIManager will need to be migrated. Historically, calls to UIManager had some pretty complicated patterns. Fortunately, we’ve created new APIs that are much cleaner. These new APIs are forward compatible with Fabric, so you can migrate your code today, and the APIs will work properly when you turn on Fabric!
The new renderer, Fabric, doesn’t use the UIManager, so direct calls to UIManager will need to be migrated. Historically, calls to UIManager had some pretty complicated patterns. Fortunately, we’ve created new APIs that are much cleaner. These new APIs are forward compatible with Fabric, so you can migrate your code today, and the APIs will work properly when you turn on Fabric!

Fabric will be providing new type safe JS APIs that are much more ergonomic than some of the patterns we've seen in product code today. These APIs require references to the underlying component, no longer using the result of `findNodeHandle`. `findNodeHandle` is used to search the tree for a native component given a class instance. This was breaking the React abstraction model. `findNodeHandle` is not compatible with React 18. Deprecation of `findNodeHandle` in React Native is similar to the [deprecation of `findDOMNode` in React DOM](https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage).

Expand Down
2 changes: 1 addition & 1 deletion docs/the-new-architecture/pillars.md
Expand Up @@ -10,7 +10,7 @@ import NewArchitectureWarning from '../\_markdown-new-architecture-warning.mdx';
The New Architecture is composed mainly of two pillars:

- [The New Native Module System - Turbo Modules](pillars-turbomodules)
- [The New Renderer - Fabric](pillars-fabric-components).
- [The New Renderer - Fabric](pillars-fabric-components)

The core concepts of React Native still holds true in the New Architecture: Native Modules are the preferred way to create libraries that leverage some platform-specific API. Native Components are the preferred way to create reusable UI components, providing a native experience to the users.

Expand Down
2 changes: 1 addition & 1 deletion docs/the-new-architecture/use-app-template.md
Expand Up @@ -13,7 +13,7 @@ This page will help you create a new React Native app that uses the New Architec

## Development Environment

Before continuing, make sure you've followed all the steps in the[Setting up the development environment](getting-started.md) section under the **React Native CLI Quickstart** tab.
Before continuing, make sure you've followed all the steps in the [Setting up the development environment](getting-started.md) section under the **React Native CLI Quickstart** tab.

If following the setup guide, stop when you reach the section **Running your React Native Application**, and resume following this guide.

Expand Down