Clearer information regarding RCT_EXPORT_MODULE

Summary:
I think this update is Critical as I wanted to add a different module name to be the same as the Android module name. I simply lost 6 hours until I found out that the Macro does not accept String syntax. Almost drove me crazy. Please, at least do something about it. Thanks.

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI
Closes https://github.com/facebook/react-native/pull/11634

Differential Revision: D4533312

Pulled By: lacker

fbshipit-source-id: 2c547f791ed76ba62e0c7e5cabc2830dbae34075
This commit is contained in:
Kevin Lacker 2017-02-08 16:44:21 -08:00 committed by Facebook Github Bot
parent edd957007d
commit f43d0a9678
1 changed files with 4 additions and 0 deletions

View File

@ -34,8 +34,12 @@ In addition to implementing the `RCTBridgeModule` protocol, your class must also
// CalendarManager.m
@implementation CalendarManager
// To export a module named CalendarManager
RCT_EXPORT_MODULE();
// This would name the module AwesomeCalendarManager instead
// RCT_EXPORT_MODULE(AwesomeCalendarManager);
@end
```