First of all, the best thing to do is finalize it to the final 1.0 (no changes in the change - bugs fixed)
See the example below on how to use simple routes with IndexRoute:
import React from 'react'
import { render } from 'react-dom';
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { Router } from 'react-router'
const Home = () =>
<h3>Home</h3>
const App = (props) =>
<div>
<h1>App</h1>
<Navigation />
{props.children}
</div>
const routes = [
{
path: '/',
component: App,
indexRoute: {
component: Home
}
}
]
const Root = () =>
<Router history={createBrowserHistory()} routes={routes} />
render(<Root />, document.getElementById('root'));
Edit: I created an example for you here . When you clone a repo, go to the example plain-routesand npm install && npm start.
source
share