Skip to content

Commit bf45a7b

Browse files
committed
updated template to match the latest RN template
1 parent 51b9a2e commit bf45a7b

File tree

6 files changed

+38
-37
lines changed

6 files changed

+38
-37
lines changed

template/_gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
xcshareddata
23+
project.xcworkspace
2424

2525
# Android/IntelliJ
2626
#

template/android/app/src/main/java/com/helloworld/MainActivity.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
public class MainActivity extends ReactActivity {
66

7-
/**
8-
* Returns the name of the main component registered from JavaScript. This is used to schedule
9-
* rendering of the component.
10-
*/
11-
@Override
12-
protected String getMainComponentName() {
13-
return "HelloWorld";
14-
}
7+
/**
8+
* Returns the name of the main component registered from JavaScript.
9+
* This is used to schedule rendering of the component.
10+
*/
11+
@Override
12+
protected String getMainComponentName() {
13+
return "HelloWorld";
14+
}
1515
}

template/android/app/src/main/java/com/helloworld/MainApplication.java

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
package com.helloworld;
22

33
import android.app.Application;
4+
45
import com.facebook.react.PackageList;
56
import com.facebook.react.ReactApplication;
67
import com.facebook.react.ReactNativeHost;
78
import com.facebook.react.ReactPackage;
89
import com.facebook.soloader.SoLoader;
10+
911
import java.util.List;
1012

1113
public class MainApplication extends Application implements ReactApplication {
1214

13-
private final ReactNativeHost mReactNativeHost =
14-
new ReactNativeHost(this) {
15-
@Override
16-
public boolean getUseDeveloperSupport() {
17-
return BuildConfig.DEBUG;
18-
}
19-
20-
@Override
21-
protected List<ReactPackage> getPackages() {
22-
@SuppressWarnings("UnnecessaryLocalVariable")
23-
List<ReactPackage> packages = new PackageList(this).getPackages();
24-
// Packages that cannot be autolinked yet can be added manually here, for example:
25-
// packages.add(new MyReactNativePackage());
26-
return packages;
27-
}
28-
29-
@Override
30-
protected String getJSMainModuleName() {
31-
return "index";
32-
}
33-
};
15+
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
16+
@Override
17+
public boolean getUseDeveloperSupport() {
18+
return BuildConfig.DEBUG;
19+
}
20+
21+
@Override
22+
protected List<ReactPackage> getPackages() {
23+
@SuppressWarnings("UnnecessaryLocalVariable")
24+
List<ReactPackage> packages = new PackageList(this).getPackages();
25+
// Packages that cannot be autolinked yet can be added manually here, for example:
26+
// packages.add(new MyReactNativePackage());
27+
return packages;
28+
}
29+
30+
@Override
31+
protected String getJSMainModuleName() {
32+
return "index";
33+
}
34+
};
3435

3536
@Override
3637
public ReactNativeHost getReactNativeHost() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

template/ios/HelloWorldTests/HelloWorldTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#import <React/RCTRootView.h>
1313

1414
#define TIMEOUT_SECONDS 600
15-
#define TEXT_TO_LOOK_FOR @"Welcome to React"
15+
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
1616

1717
@interface HelloWorldTests : XCTestCase
1818

template/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test": "jest"
88
},
99
"dependencies": {
10-
"react": "16.8.1",
10+
"react": "16.8.6",
1111
"react-native": "0.60.0"
1212
},
1313
"devDependencies": {
@@ -16,13 +16,13 @@
1616
"@react-native-community/eslint-config": "^0.0.3",
1717
"@types/jest": "^24.0.15",
1818
"@types/react": "^16.8.23",
19-
"@types/react-native": "^0.57.65",
19+
"@types/react-native": "^0.60.0",
2020
"@types/react-test-renderer": "^16.8.2",
2121
"babel-jest": "^24.1.0",
2222
"jest": "^24.1.0",
23-
"metro-react-native-babel-preset": "^0.51.1",
24-
"react-test-renderer": "16.8.1",
25-
"typescript": "^3.5.2"
23+
"metro-react-native-babel-preset": "^0.54.1",
24+
"react-test-renderer": "^16.8.6",
25+
"typescript": "^3.5.3"
2626
},
2727
"jest": {
2828
"preset": "react-native",

0 commit comments

Comments
 (0)