Skip to content

Instantly share code, notes, and snippets.

@EnetoJara
Created February 10, 2020 00:49
Show Gist options
  • Save EnetoJara/4a28594cbd4ffa34a688ba7fd1ccb19c to your computer and use it in GitHub Desktop.
Save EnetoJara/4a28594cbd4ffa34a688ba7fd1ccb19c to your computer and use it in GitHub Desktop.
import React from 'react';
import { BrowserRouter, Redirect, Route, Switch } from "react-router-dom";
import './App.css';
import { Home } from "./Home";
import { Son } from "./Son";
function App() {
return (
<div className="App">
<BrowserRouter>
<Switch>
<Route exact path="/son" component={Son}/>
<Route exact path="/" component={Home}/>
<Redirect from="*" to="/" />
</Switch>
</BrowserRouter>
</div>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment