Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: --module-name is no longer supported in create-react-native-module #440

Conversation

BartoszKlonowski
Copy link
Contributor

@BartoszKlonowski BartoszKlonowski commented May 21, 2021

This pull request removes the --module-name option from the example of creating the native module library project using the create-react-native-module library.

The --module-name option has been renamed to --package-name in PR#431, moreover it is optional to use, as it defaults to the name given in the parameter.


Another change introduced in this pull request is the separation of following official React Native instructions from following the bat code steps presented below it.
React Native instructions use callstack/react-native-builder-bob while examples presented in these docs use brodybits/create-react-native-module.
It is important to emphasize that these two libraries are different and may (and soon will) lead to different results.

IMPORTANT NOTE: Within next week (24.05 - 28.05) the callstack/react-native-builder-bob will be provided with Windows support, which will make the further steps presented in this document unnecessary (but still necessary if brodybits/create-react-native-module is used instead).
Once this happens, the guide will have to be further modified, but the scope of this PR is to ensure the difference is known to user/developer and no --module-name option is there to increase confusion.

Microsoft Reviewers: Open in CodeFlow

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.
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.
@BartoszKlonowski BartoszKlonowski requested a review from a team as a code owner May 21, 2021 13:35
@NickGerleman NickGerleman merged commit f0d3502 into microsoft:master May 24, 2021
@asklar
Copy link
Member

asklar commented Jun 3, 2021

thanks @BartoszKlonowski !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants