Skip to content

Commit 47d5560

Browse files
committed
Update README.md
Fixing docs relating to extending Component instead of React.Component
1 parent 86d7b23 commit 47d5560

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Usage
1717
-----
1818

1919
```javascript
20-
import Router, { Component } from 'react-native-simple-router';
20+
import Router from 'react-native-simple-router';
2121
```
2222

2323
The basics:
2424
```javascript
2525
// The initial page
26-
class HelloPage extends Component {
26+
class HelloPage extends React.Component {
2727

2828
render() {
2929
return <Text>Hello world!</Text>;
@@ -40,7 +40,7 @@ var firstRoute = {
4040
};
4141

4242
// The Router wrapper
43-
class MyApp extends Component {
43+
class MyApp extends React.Component {
4444

4545
render() {
4646
return (
@@ -58,7 +58,7 @@ Boom. That's it.
5858
From the "Hello world!"-page you can then navigate further to a new component by calling ```this.props.toRoute()```. Let's build upon the HelloPage component in our first example:
5959

6060
```javascript
61-
class HelloPage extends Component {
61+
class HelloPage extends React.Component {
6262

6363
nextPage() {
6464
this.props.toRoute({

0 commit comments

Comments
 (0)