Skip to content

Commit b73b7c3

Browse files
committed
docs: mention we dont handle codegen automatically yet
1 parent dfb84d9 commit b73b7c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/pages/build.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ npx react-native-builder-bob@latest init
2424

2525
This will ask you a few questions and add the required configuration and scripts for building the code. The code will be compiled automatically when the package is published.
2626

27+
> Note: the `init` command doesn't add the `codegen` target yet. You can either add it manually or create a new library with `create-react-native-library`.
28+
2729
You can find details on what exactly it adds in the [Manual configuration](#manual-configuration) section.
2830

2931
## Manual configuration
@@ -116,6 +118,8 @@ yarn add --dev react-native-builder-bob
116118

117119
It's also recommended to ship your Codegen generated scaffold code with your library since it has numerous benefits. To see the benefits and implement this behavior, you can see the [Official Codegen Shipping Guide](https://reactnative.dev/docs/the-new-architecture/codegen-cli#including-generated-code-into-libraries).
118120

121+
> Note: If you enable Codegen generated code shipping, React Native won't build the scaffold code automatically when you build your test app. You need to rebuild the codegen scaffold code manually each time you make changes to your spec. If you want to automate this process, you can create a new project with `create-react-native-library` and inspect the example app.
122+
119123
##### Opting out of Codegen shipping __(not recommended)__
120124

121125
If you have a reason to not ship Codegen generated scaffold code with your library, you need to remove the [codegen target](#codegen) and add `package.json` to your `exports` field. Otherwise, React Native Codegen will skip spec generation for your library when your library is consumed as an NPM library. You can find the related issue [here](https://github.com/callstack/react-native-builder-bob/issues/637).

0 commit comments

Comments
 (0)