Skip to content

Commit cf797c2

Browse files
committed
fix: add missing code for react navigation handle error
1 parent 0d3528c commit cf797c2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
It is a template that you can clone and reuse for every project. It is starting point for React Native application.
88

9+
##Wanna use React Native TypeScript Boilerplate ?
10+
check it out here [React Native TypeScript Boilerplate](https://github.com/handi-dev/react-native-typescript-boilerplate)
11+
912
## React Native Boilerplate ( 0.69.1 )
1013

1114
consist of:
@@ -42,6 +45,13 @@ To create a new project using the boilerplate simply run :
4245
npx react-native init MyApp --template @handidev/react-native-boilerplate
4346
```
4447

48+
If you want to use typescript version of this React Native Boilerplate, just run this command:
49+
50+
```
51+
npx react-native init MyApp --template @handidev/react-native-typescript-boilerplate
52+
```
53+
54+
4555
note: replace `MyApp` with your desired App name.
4656

4757
Assuming you have all the requirements installed, you can run the project by running:

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.reactnativeboilerplate;
2+
import android.os.Bundle;
23

34
import com.facebook.react.ReactActivity;
45
import com.facebook.react.ReactActivityDelegate;
@@ -15,6 +16,11 @@ protected String getMainComponentName() {
1516
return "ReactNativeBoilerplate";
1617
}
1718

19+
@Override
20+
protected void onCreate(Bundle savedInstanceState) {
21+
super.onCreate(null);
22+
}
23+
1824
/**
1925
* Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
2026
* you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer

0 commit comments

Comments
 (0)