Created
May 13, 2017 17:57
-
-
Save Louiefigz/a4771fe8a85de62b3cde6ae831501668 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
import './index.css'; | |
import Home from './components/home'; | |
//require the component forecast for our | |
///forecast/:city path | |
import Forecast from './components/forecast'; | |
// Importing React Router libraries | |
import { Router, Route, browserHistory, IndexRoute } from 'react-router'; | |
ReactDOM.render( | |
<Router history={browserHistory}> | |
<Route path="/" component={App}> | |
<IndexRoute component={Home}/> | |
<Route path="/forecast/:city" component={Forecast}/> | |
</Route> | |
</Router>, | |
document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment