From f43d0a96780b92ddcdda961de30627604907e2dd Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Wed, 8 Feb 2017 16:44:21 -0800 Subject: [PATCH] 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 --- docs/NativeModulesIOS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/NativeModulesIOS.md b/docs/NativeModulesIOS.md index 97c4655c2..8f6db4929 100644 --- a/docs/NativeModulesIOS.md +++ b/docs/NativeModulesIOS.md @@ -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 ```