Skip to content

Commit

Permalink
Update jsx-loader and react-router
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Hutchison committed Feb 11, 2015
1 parent ea4bdcf commit 5ba69e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions examples/index.js
@@ -1,7 +1,8 @@
'use strict';

var React = require('react'),
{ Routes, Route, Redirect, Link } = require('react-router'),
Router = require('react-router'),
{ Route, Redirect, Link, RouteHandler } = Router,
DragAroundNaive = require('./_drag-around-naive/index'),
DragAroundCustom = require('./_drag-around-custom/index'),
DustbinSimple = require('./_dustbin-simple'),
Expand All @@ -10,8 +11,6 @@ var React = require('react'),

var App = React.createClass({
render() {
var RouteHandler = this.props.activeRouteHandler;

return (
<div>
<h1>react-dnd examples (<a target='_href' href='https://github.com/gaearon/react-dnd/blob/master/examples'>source</a>)</h1>
Expand All @@ -28,17 +27,18 @@ var App = React.createClass({
});

var routes = (
<Routes location={process.env.NODE_ENV === 'production' ? 'hash' : 'history'}>
<Route handler={App}>
<Route name='drag-around-naive' path='drag-around-naive' handler={DragAroundNaive} />
<Route name='drag-around-custom' path='drag-around-custom' handler={DragAroundCustom} />
<Route name='dustbin-simple' path='dustbin-simple' handler={DustbinSimple} />
<Route name='dustbin-interesting' path='dustbin-interesting' handler={DustbinInteresting} />
<Route name='sortable-simple' path='sortable-simple' handler={SortableSimple} />
<Route handler={App}>
<Route name='drag-around-naive' path='drag-around-naive' handler={DragAroundNaive} />
<Route name='drag-around-custom' path='drag-around-custom' handler={DragAroundCustom} />
<Route name='dustbin-simple' path='dustbin-simple' handler={DustbinSimple} />
<Route name='dustbin-interesting' path='dustbin-interesting' handler={DustbinInteresting} />
<Route name='sortable-simple' path='sortable-simple' handler={SortableSimple} />

<Redirect from='/' to='dustbin-simple' />
</Route>
</Routes>
<Redirect from='/' to='dustbin-simple' />
</Route>
);

React.render(routes, document.body);
Router.run(routes,
process.env.NODE_ENV === 'production' ? Router.HashLocation : Router.HistoryLocation,
(Handler) => React.render(<Handler/>, document.body)
);
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -38,11 +38,11 @@
"react": "0.12.x"
},
"devDependencies": {
"jsx-loader": "0.12.1",
"jsx-loader": "0.12.2",
"path": "0.4.9",
"react": "0.12.0",
"react": "0.12.x",
"react-hot-loader": "^1.1.4",
"react-router": "0.10.2",
"react-router": "0.12.x",
"request": "2.46.0",
"webpack": "1.4.8",
"webpack-dev-server": "1.7.0"
Expand Down

0 comments on commit 5ba69e2

Please sign in to comment.