-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
43 lines (35 loc) · 763 Bytes
/
index.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
// import the stuff we want to use
import {
h,
render,
Component
} from 'preact';
import {
Login
} from './login.js'
import UserStore from './stores/UserStore';
class App extends Component {
componentDidMount() {
UserStore.addChangeListener(this.onChange);
}
componentWillUnmount() {
UserStore.removeChangeListener(this.onChange);
}
render() {
return (
<body>
<div className="container">
<div><Login /></div>
<div className="container app-footer">
<h6>Press 'Enter' or click on progress bar for next step.</h6>
</div>
</div>
</body>
)
}
onChange() {
this.setState(getState());
}
}
//render an instance of App into id <placeholder>:
render(<App />, placeholder);