From 425a7f7a84a88dc5303df8c23ea382041672618c Mon Sep 17 00:00:00 2001 From: Yao Bin Date: Fri, 1 Apr 2016 10:07:27 -0700 Subject: [PATCH] Improve Android native module doc Summary:Show the complete example of the Package code, as the auto generated snippet will return null in `createJSModules` and `createViewManagers`, which will then result in error described in http://stackoverflow.com/questions/35823908 Closes https://github.com/facebook/react-native/pull/6763 Differential Revision: D3126729 Pulled By: mkonicek fb-gh-sync-id: 8fd4bf8e37242b40670d95679aa5c836e32a7cec fbshipit-source-id: 8fd4bf8e37242b40670d95679aa5c836e32a7cec --- docs/NativeModulesAndroid.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/NativeModulesAndroid.md b/docs/NativeModulesAndroid.md index 5727c2260..df109c9e5 100644 --- a/docs/NativeModulesAndroid.md +++ b/docs/NativeModulesAndroid.md @@ -95,7 +95,15 @@ The last step within Java is to register the Module; this happens in the `create ```java class AnExampleReactPackage implements ReactPackage { - ... + @Override + public List> createJSModules() { + return Collections.emptyList(); + } + + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } @Override public List createNativeModules(