From 9c8068bf46fd747b04aca9cc907560df49895e0c Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Thu, 9 Feb 2017 04:08:33 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/native-modules-ios.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/releases/next/docs/native-modules-ios.html b/releases/next/docs/native-modules-ios.html index 76e7fd3e289..4ca5416289d 100644 --- a/releases/next/docs/native-modules-ios.html +++ b/releases/next/docs/native-modules-ios.html @@ -4,13 +4,9 @@ @interface CalendarManager : NSObject <RCTBridgeModule> @end

In addition to implementing the RCTBridgeModule protocol, your class must also include the RCT_EXPORT_MODULE() macro. This takes an optional argument that specifies the name that the module will be accessible as in your JavaScript code (more on this later). If you do not specify a name, the JavaScript module name will match the Objective-C class name.

// CalendarManager.m @implementation CalendarManager - -// To export a module named CalendarManager -RCT_EXPORT_MODULE(); - -// This would name the module AwesomeCalendarManager instead -// RCT_EXPORT_MODULE(AwesomeCalendarManager); - + +RCT_EXPORT_MODULE(); + @end

React Native will not expose any methods of CalendarManager to JavaScript unless explicitly told to. This is done using the RCT_EXPORT_METHOD() macro:

#import "CalendarManager.h" #import <React/RCTLog.h>