Skip to content

Commit

Permalink
removes render form from example app
Browse files Browse the repository at this point in the history
As discussed here 851e3c1#commitcomment-17818287

Will keep render as Easter egg

Closes #13
  • Loading branch information
jonathanglasmeyer authored and jmurzy committed Jun 11, 2016
1 parent 1b66243 commit 763d53e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ Look at `app/routes.js` and play around with the app to get a feel for what's po
### Usage

```javascript
import { Router, Route, render } from 'react-router-native';
// index.[ios|android].js

const APP_KEY = 'app'
import { AppRegistry } from 'react-native';
import { Router, Route, TabsRoute } from 'react-router-native';

const App = (props) => (/*...*/);
const About = (props) => (/*...*/);
Expand All @@ -55,7 +56,7 @@ const User = (props) => (/*...*/);
const UserHeader = (props) => (/*...*/);
const NoMatch = (props) => (/*...*/);

render((
const routes = (
/* Address Bar can be toggled on or off by setting the addressBar prop */
<Router addressBar>
<TabsRoute
Expand All @@ -70,7 +71,9 @@ render((
</TabsRoute>
<Route path="*" component={NoMatch}/>
</Router>
), APP_KEY);
);

AppRegistry.registerComponent('YourApp', () => () => routes);
```

### Advanced Usage
Expand Down
12 changes: 2 additions & 10 deletions examples/Aviato/index.ios.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import { render } from 'react-router-native';
import { AppRegistry } from 'react-native';
import routes from './app/routes';

render(routes, 'Aviato');

//
// - or -
//
//
// import { AppRegistry } from 'react-native';
//
// AppRegistry.registerComponent('Aviato', () => () => routes);
AppRegistry.registerComponent('Aviato', () => () => routes);

0 comments on commit 763d53e

Please sign in to comment.