diff --git a/docs/native-modules.md b/docs/native-modules.md index 20124de0d..a4865b26d 100644 --- a/docs/native-modules.md +++ b/docs/native-modules.md @@ -149,7 +149,7 @@ namespace NativeModuleSample } [ReactEvent] - public ReactEvent AddEvent { get; set; } + public Action AddEvent { get; set; } } } ``` @@ -497,12 +497,12 @@ class NativeModuleSample extends Component { componentDidMount() { // Subscribing to FancyMath.AddEvent - FancyMathEventEmitter.addListener('AddEvent', eventHandler, this); + FancyMathEventEmitter.addListener('AddEvent', this.eventHandler, this); } componentWillUnmount() { // Unsubscribing from FancyMath.AddEvent - FancyMathEventEmitter.removeListener('AddEvent', eventHandler, this); + FancyMathEventEmitter.removeListener('AddEvent', this.eventHandler, this); } eventHandler(result) {