-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
34 lines (31 loc) · 885 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
import React, { Component } from 'react';
import { hot } from 'react-hot-loader';
import axios from 'axios';
import logo from './logo.png';
import styles from './App.less';
class App extends Component {
componentDidMount() {
axios.get('/api/user')
.then(res => {
console.log('*** res: ', res); // eslint-disable-line no-console
})
.catch(error => {
console.log('*** error: ', error); // eslint-disable-line no-console
});
}
render() {
return (
<div className={styles.app}>
<header className={styles.app_header}>
<img src={logo} alt="logo" />
<h1>Hello, athena</h1>
</header>
<p className={styles.app_intro}>
To get started, edit <code>src/App.js</code> and save to reload.
</p>
</div>
);
}
}
// export default App;
export default hot(module)(App);