Browse Source

Edited how to return additional packages (#1161)

Docs weren't very clear on how exactly to return additional packages, i.e., as a <ReactPackages> list [Line 65]. 
Also changed MyApplication to MainApplication on line 54 (if that is a default and hasn't been changed by the developer).
Eshwar Ramesh 7 years ago
parent
commit
bf09cfd885
1 changed files with 7 additions and 3 deletions
  1. 7
    3
      docs/installation-android.md

+ 7
- 3
docs/installation-android.md View File

51
 	```java
51
 	```java
52
 	import com.reactnativenavigation.NavigationApplication;
52
 	import com.reactnativenavigation.NavigationApplication;
53
 	
53
 	
54
-	public class MyApplication extends NavigationApplication {
54
+	public class MainApplication extends NavigationApplication {
55
  
55
  
56
     	@Override
56
     	@Override
57
 		public boolean isDebug() {
57
 		public boolean isDebug() {
61
 
61
 
62
 	    @Override
62
 	    @Override
63
 	    public List<ReactPackage> createAdditionalReactPackages() {
63
 	    public List<ReactPackage> createAdditionalReactPackages() {
64
-		    // Add the packages you require here.
65
-			// No need to add RnnPackage and MainReactPackage
64
+		// Add the packages you require here like so... (Tested on RN 0.42)
65
+		return Arrays.<ReactPackage>asList(
66
+           	    new <InsertPackageName()>;
67
+       		);
68
+		// No need to add RnnPackage and MainReactPackage
69
+		// Simply return null if you do not have additional packages    
66
 	        return null;
70
 	        return null;
67
 	    }
71
 	    }
68
 	}
72
 	}