-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
52 lines (48 loc) · 1.29 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
52
import React, { Component, Fragment } from 'react';
import { Route, Link } from 'react-router-dom';
import Home from './Home';
import Projects from './Projects';
import Resume from './Resume';
import Contact from './Contact';
import animateVines from './vines';
class App extends Component {
constructor(props) {
super(props);
this.canvasRef = React.createRef();
}
componentDidMount() {
animateVines(this.canvasRef.current);
}
render() {
return (
<Fragment>
<nav>
<ul>
<li>
<Link to="/">About</Link>
</li>
<li>
<Link to="/projects">Projects</Link>
</li>
<li>
<Link to="/resume">Resume</Link>
</li>
<li>
<Link to="/contact">Contact</Link>
</li>
</ul>
<div className="canvas-container">
<canvas ref={this.canvasRef} />
</div>
</nav>
<section className="container">
<Route exact path="/" component={Home} />
<Route path="/projects" component={Projects} />
<Route path="/resume" component={Resume} />
<Route path="/contact" component={Contact} />
</section>
</Fragment>
);
}
}
export default App;