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
This commit is contained in:
parent
d5dffceec0
commit
425a7f7a84
|
@ -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<Class<? extends JavaScriptModule>> createJSModules() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NativeModule> createNativeModules(
|
||||
|
|
Loading…
Reference in New Issue