diff --git a/README.md b/README.md index 684795417..c50de977a 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]; 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`}