Skip to content

Commit

Permalink
Fix: --module-name is no longer supported in `create-react-native-m…
Browse files Browse the repository at this point in the history
…odule` (#440)

* Remove --module-name option from module creation code

The code presented in the docs for creating the NativeModuleSample still
had the --module-name  option, which was renamed to  --package-name  in:
brodybits/create-react-native-module#431

This commit removes this option, as the --package-name is optional and
by default the name will be set as the one used as second parameter.

* Separate `create-react-native-module` as another option

Official React Native instructions use react-native-builder-bob from
Callstack.io company to create the native module project, while the
example presented below it uses other community library.
It is essential to emphasize that these are not the same ways to create
the project.
This commit adds "or" to ensure that the reader will be aware of those
options.
  • Loading branch information
BartoszKlonowski committed May 24, 2021
1 parent 61b8247 commit f0d3502
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/native-modules-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ The steps to create a new native module library project are:

### Creating a blank native module project

Follow the official React Native instructions at https://reactnative.dev/docs/native-modules-setup.
Follow the official React Native instructions at https://reactnative.dev/docs/native-modules-setup,

or execute the following commands:

```bat
npx create-react-native-module --module-name "NativeModuleSample" NativeModuleSample
npx create-react-native-module NativeModuleSample
cd NativeModuleSample
yarn install
```
Expand Down

0 comments on commit f0d3502

Please sign in to comment.