Skip to content

Commit 3226584

Browse files
committed
Update the PR to reflect knowledge that the code sample is correct but documentation wrong
1 parent be8e2e9 commit 3226584

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,24 +151,22 @@ The shared configuration is a `package.json` file used by yarn when installing y
151151
"react": "*",
152152
"react-native": "*"
153153
},
154-
"codegenConfig": [
155-
{
156-
"name": "RTNCalculatorSpec",
157-
"type": "modules",
158-
"jsSrcsDir": "js",
159-
"android": {
160-
"javaPackageName": "com.rtncalculator"
161-
}
154+
"codegenConfig": {
155+
"name": "RTNCalculatorSpec",
156+
"type": "modules",
157+
"jsSrcsDir": "js",
158+
"android": {
159+
"javaPackageName": "com.rtncalculator"
162160
}
163-
]
161+
}
164162
}
165163
```
166164
167165
The upper part of the file contains some descriptive information like the name of the component, its version, and its source files. Make sure to update the various placeholders which are wrapped in `<>`: replace all the occurrences of the `<your_github_handle>`, `<Your Name>`, and `<your_email@your_provider.com>` tokens.
168166
169167
Then there are the dependencies for this package. For this guide, you need `react` and `react-native`.
170168
171-
Finally, the **Codegen** configuration is specified by the `codegenConfig` field. It contains an array of libraries, each of which is defined by three other fields:
169+
Finally, the **Codegen** configuration is specified by the `codegenConfig` field. It contains an object that defines the module through four fields:
172170
173171
- `name`: The name of the library. By convention, you should add the `Spec` suffix.
174172
- `type`: The type of module contained by this package. In this case, it is a Turbo Native Module; thus, the value to use is `modules`.

0 commit comments

Comments
 (0)