From 35590440d69b634c0746c2209d0c47a4490d538a Mon Sep 17 00:00:00 2001 From: Nick Hudkins Date: Mon, 11 May 2015 15:37:58 -0400 Subject: [PATCH 1/3] correct homepage code examples The examples for Extensibility on the home page are broken :(. RCT_EXPORT_MODULE() is missing, and RCT_EXPORT_VIEW_PROPERTY's signature has changed to accept a type as the 2nd argument. --- website/src/react-native/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/src/react-native/index.js b/website/src/react-native/index.js index 729e74b48..382d5ab1f 100644 --- a/website/src/react-native/index.js +++ b/website/src/react-native/index.js @@ -215,12 +215,14 @@ var Message = React.createClass({ @implementation MyCustomViewManager +RCT_EXPORT_MODULE() + - (UIView *)view { return [[MyCustomView alloc] init]; } -RCT_EXPORT_VIEW_PROPERTY(myCustomProperty); +RCT_EXPORT_VIEW_PROPERTY(myCustomProperty, NSString); @end`} From d43d093bf7ffcfa2e8323f612cd6c5bf43bd60ef Mon Sep 17 00:00:00 2001 From: Nick Hudkins Date: Mon, 11 May 2015 19:06:15 -0400 Subject: [PATCH 2/3] Update README.md with valid code example. Custom iOS View code sample was missing RCT_EXPORT_MODULE() --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 684795417..68eaa6948 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,8 @@ Custom iOS views can be exposed by subclassing `RCTViewManager`, implementing a @implementation MyCustomViewManager +RCT_EXPORT_MODULE(); + - (UIView *)view { return [[MyCustomView alloc] init]; From 7947f04b43463f27d6da94df9f8acf8c6c0fc59a Mon Sep 17 00:00:00 2001 From: Nick Hudkins Date: Mon, 11 May 2015 19:53:49 -0400 Subject: [PATCH 3/3] Update README.md to follow conventions Don't submit pull requests from your phone while eating dinner or you will make careless mistakes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68eaa6948..c50de977a 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ Custom iOS views can be exposed by subclassing `RCTViewManager`, implementing a @implementation MyCustomViewManager -RCT_EXPORT_MODULE(); +RCT_EXPORT_MODULE() - (UIView *)view {