Skip to content

Commit

Permalink
nit: fix typo in new architecture docs (#3261)
Browse files Browse the repository at this point in the history
* fix typo

* fix: typescript example

* fix: lint

* make text optional
  • Loading branch information
intergalacticspacehighway authored Aug 19, 2022
1 parent 50ce399 commit e28ed12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/the-new-architecture/pillars-codegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ In the example above, there are both a TurboModule and a set of Fabric Component

Each TurboModule's folder contains two files: an interface file and an implementation file.

The interface files have the same name of the TurboModule and they contain methods to initialize their the JSI interface.
The interface files have the same name of the TurboModule and they contain methods to initialize the JSI interface.

The implementation files, instead, have the `-generated` suffix and they contains the logic to invoke the native methods from JS and viceversa.

Expand Down Expand Up @@ -218,7 +218,7 @@ Notice that both TurboModules and Fabric Components comes with two build file de

### TurboModule

The **Codegen** generates a Java abstract class in the `java` package which the same name of the TurboModule. This abstract class has to be implemented by the JNI C++ implementation.
The **Codegen** generates a Java abstract class in the `java` package with the same name of the TurboModule. This abstract class has to be implemented by the JNI C++ implementation.

Then, it generates the C++ files in the `jni` folder. They follow the same iOS convention: there is an interface called `MyTurbomodule.h` and an implementation file called `MyTurbomodule-generated.cpp`. The former is an interface that allows React Natvie to initialize the JSI interface for the TurboModule. The latter is the implementation file which contains the logic to invoke the native method from JS and viceversa.

Expand Down
3 changes: 1 addition & 2 deletions docs/the-new-architecture/pillars-fabric-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ import type { HostComponent } from 'react-native';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';

export interface NativeProps extends ViewProps {
...ViewProps,
text: string | null | undefined,
text?: string;
// add other props here
}

Expand Down

0 comments on commit e28ed12

Please sign in to comment.