-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
40 lines (33 loc) · 842 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import logo from './logo.svg';
import './App.css';
import {Router, Link, Switch} from 'react-router-dom'
import Home from './Pages/Home';
import Empresa from './Pages/Empresa';
import Contato from './Pages/Contato';
function App() {
return (
<Router>
<ul>
<li><Link> to="/">Home</Link>
</li>
<li><Link to="/empresa">Empresa</Link>
</li>
<li><Link to="/contato">Contato</Link>
</li>
</ul>
<Switch>
<Router path="/">
<Home></Home>
</Router>
<Router path="/empresa">
<Empresa></Empresa>
</Router>
<Router path="/contato">
<Contato></Contato>
</Router>
</Switch>
</Router>
)
}
export default App;
//Switch diz para aonde vai alterar e Route que vai ser o Roteamento de link //