andy840119
/
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Public
forked from eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
e.jsx
33 lines (25 loc) · 546 Bytes
/
e.jsx
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
import React, { Component } from 'react';
class E extends Component {
constructor(props) {
super(props);
this.state = {
e: 0,
};
this.timer = this.timer.bind(this);
}
componentDidMount() {
const eId = setInterval(this.timer, 10);
this.setState({ eInterval: eId });
}
componentWillUnmount() {
clearInterval(this.state.eInterval);
}
timer() {
this.setState({ e: this.state.e + 1 });
}
render() {
const e = Array(this.state.e).fill(<p>e</p>);
return e;
}
}
export default E;