Skip to content

Commit e28ed12

Browse files
nit: fix typo in new architecture docs (#3261)
* fix typo * fix: typescript example * fix: lint * make text optional
1 parent 50ce399 commit e28ed12

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docs/the-new-architecture/pillars-codegen.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ In the example above, there are both a TurboModule and a set of Fabric Component
114114

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

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

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

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

219219
### TurboModule
220220

221-
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.
221+
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.
222222

223223
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.
224224

docs/the-new-architecture/pillars-fabric-components.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ import type { HostComponent } from 'react-native';
9696
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9797

9898
export interface NativeProps extends ViewProps {
99-
...ViewProps,
100-
text: string | null | undefined,
99+
text?: string;
101100
// add other props here
102101
}
103102

0 commit comments

Comments
 (0)