()
| 80 | var COUNT = this.props.COUNT; |
| 81 | |
| 82 | var counting = function counting() { |
| 83 | var count = _this.props.count; |
| 84 | |
| 85 | switch (true) { |
| 86 | case count > num: |
| 87 | COUNT('DECREMENT'); |
| 88 | break; |
| 89 | case count < num: |
| 90 | COUNT('INCREMENT'); |
| 91 | break; |
| 92 | case count === num: |
| 93 | return callback && callback(); |
| 94 | } |
| 95 | _this.rid = requestAnimationFrame(counting); |
| 96 | }; |
| 97 | counting(); |
| 98 | }, |
| 99 | componentWillUpdate: function componentWillUpdate() { |