Skip to content

Instantly share code, notes, and snippets.

@oliverbenns
Created July 16, 2015 03:50
Show Gist options
  • Save oliverbenns/fe9830676d800122702e to your computer and use it in GitHub Desktop.
Save oliverbenns/fe9830676d800122702e to your computer and use it in GitHub Desktop.
import React from 'react';
import { Router, Route } from 'react-router';
import { history } from 'react-router/lib/HashHistory';
// Components
import App from '../app/'
import NotFound from 'not-found'
// Routes
import Zones from './zones'
React.render((
<Router history={ history }>
<Route path="/" component={ App }>
<Zones />
<Route path="*" component={ NotFound } />
</Route>
</Router>
), document.body);
import React, { Component } from 'react';
import { Route } from 'react-router';
// Views
import Zones from 'zones';
export default class ZonesRoutes extends Component {
render() {
return (
<Route path="zones" component={ Zones } />
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment