Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created Jan 12, 2021
Embed
What would you like to do?
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import RepoList from './RepoList';
import RepoDetails from './RepoDetails';
import './App.css';
function App() {
return (
<Router>
<div className="App">
<Switch>
<Route path="/repo/:owner/:repo" component={RepoDetails} />
<Route path="/" component={RepoList} />
</Switch>
</div>
</Router>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment