Skip to content

Instantly share code, notes, and snippets.

@mohandere mohandere/app.js
Last active May 19, 2017

Embed
What would you like to do?
React-todo
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link } from 'react-router-dom';
import { Grid, Row, Col, PageHeader } from 'react-bootstrap';
import './App.css';
import Home from './components/Home';
import About from './components/About';
class App extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="App">
<Router>
<Grid>
<PageHeader>
ToDo App
</PageHeader>
<Row className="wrap">
<Col xs={12} sm={3} className="sidebar text-left">
Welcome
<ul className="list-unstyled">
<li><Link to="/">Home</Link></li>
<li><Link to="/about">About</Link></li>
</ul>
</Col>
<Col xs={12} sm={9} className="main">
<div className="content">
<Route path='/' exact={true} component={Home} />
<Route path='/about' component={About} />
</div>
</Col>
</Row>
</Grid>
</Router>
</div>
);
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.