Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vicke4 committed Jan 5, 2021
1 parent 6040d3d commit 12781bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

```
$ npm install --save react-native-invoke-app
# if you are react-native version is <0.60
$ react-native link react-native-invoke-app
```

Expand Down Expand Up @@ -44,7 +45,7 @@ Let's say you want to navigate to dashboard screen of the app after a specific t

```javascript
import React, { Component } from 'react';
import { DeviceEventEmitter, Text, View } from 'react-native';
import { AppRegistry, DeviceEventEmitter, Text, View } from 'react-native';
import { createStackNavigator } from 'react-navigation';
import invokeApp from 'react-native-invoke-app';

Expand All @@ -54,7 +55,7 @@ class App extends Component {
componentWillMount() {
DeviceEventEmitter.addListener('appInvoked', (data) => {
const { route } = data;

// Using react-navigation library for navigation.
this.props.navigation.navigate(route);
});
Expand Down Expand Up @@ -117,7 +118,7 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "testProject";
}

+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
Expand Down

0 comments on commit 12781bc

Please sign in to comment.