Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

Commit

Permalink
Update example for React 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
aputinski committed Jan 15, 2016
1 parent 5998b06 commit ffecfe1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion examples/index.dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<link type="text/css" rel="stylesheet" href="assets/example.css" />
</head>
<body>
<div id="app"></div>
<script src="//localhost:3000/webpack-dev-server.js"></script>
<script src="assets/example.js"></script>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link type="text/css" rel="stylesheet" href="assets/example.css" />
</head>
<body>
<div id="app"></div>
<script src="assets/example.js"></script>
</body>
</html>
</html>
3 changes: 2 additions & 1 deletion examples/src/example.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const React = require('react');
const ReactDOM = require('react-dom');

const NavigationController = require('../../src/navigation-controller');
const View =require('./view');
Expand Down Expand Up @@ -29,4 +30,4 @@ class App extends React.Component {
}
}

React.render(<App />, document.body);
ReactDOM.render(<App />, document.getElementById('app'));
6 changes: 2 additions & 4 deletions examples/src/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {

const colors = [
'#0074D9', '#7FDBFF', '#39CCCC', '#2ECC40', '#FFDC00', '#FF851B', '#FF4136',
'#F012BE', '#B10DC9'
'#F012BE', '#B10DC9'
];

function getColor() {
Expand All @@ -33,9 +33,7 @@ class View extends React.Component {
}
onNext() {
const view = <View index={this.props.index+1} />;
this.props.navigationController.pushView(view, {

});
this.props.navigationController.pushView(view, {});
}
onBack() {
this.props.navigationController.popView({
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"minimist": "^1.2.0",
"mocha": "^2.3.4",
"phantomjs": "^1.9.19",
"react": "0.14.6",
"react": "^0.14.6",
"react-dom": "^0.14.6",
"sinon": "^1.17.2",
"webpack": "^1.12.11",
"webpack-dev-server": "^1.14.1"
Expand Down

0 comments on commit ffecfe1

Please sign in to comment.