-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathapp.js
51 lines (44 loc) · 1.17 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
import './app.css';
import React from 'react';
import AppRouting from './app-routing';
import { Link } from "react-router-dom";
class App extends React.Component {
constructor(props) {
super(props);
this.title = 'react-lazy-loading';
this.footerUrl = 'https://www.ganatan.com';
this.footerLink = 'www.ganatan.com';
}
render() {
return (
<div className="app">
<header>
<section>
<h1>{this.title}</h1>
</section>
<nav>
<h2>4 Links with Routes</h2>
<ul>
<li><Link to="/">Home</Link></li>
<li><Link to="/about">About</Link></li>
<li><Link to="/login">Login</Link></li>
<li><Link to="/signup">Signup</Link></li>
</ul>
<h3>1 Link with Child Routes</h3>
<ul>
<li><Link to="/contact">Contact</Link></li>
</ul>
</nav>
</header>
<main>
<h4>Routes Result</h4>
<AppRouting />
</main>
<footer>
<a href="{ this.footerUrl }">{this.footerLink}</a>
</footer>
</div>
)
}
}
export default App;