Skip to content

Instantly share code, notes, and snippets.

@bilal-fazlani
Created April 7, 2018 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bilal-fazlani/8d0ccda7233e9833109f3c807517fb97 to your computer and use it in GitHub Desktop.
Save bilal-fazlani/8d0ccda7233e9833109f3c807517fb97 to your computer and use it in GitHub Desktop.
signalr-react-demo
import React, {Component} from 'react';
import {Link, Route, withRouter} from "react-router-dom";
import About from "./Components/About";
import EmployeeDetails from "./Components/EmployeeDetails";
import AddEmployee from "./Components/AddEmployee";
import EditEmployee from "./Components/EditEmployee";
import Dashboard from "./Components/Dashboard";
class App extends Component {
render() {
return (
<div className="App">
<header>
&nbsp;
<Link to="/">Home</Link>
&nbsp; | &nbsp;
<Link to="/add-new-employee">Add new employee</Link>
&nbsp; | &nbsp;
<Link to="/about">About</Link>
</header>
<hr />
<main>
<Route exact path="/" component={Dashboard}/>
<Route exact path="/about" component={About}/>
<Route exact path="/add-new-employee" component={AddEmployee}/>
<Route exact path="/employee/:id" component={EmployeeDetails}/>
<Route path="/employee/:id/edit" component={EditEmployee}/>
</main>
</div>
);
}
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment