Refactor
This commit is contained in:
@@ -42,6 +42,10 @@ class Tree extends React.PureComponent<Props, State> {
|
||||
this.state = { lastUpdate: 0 }
|
||||
}
|
||||
|
||||
private performanceCallback = (ms: number) => {
|
||||
average.push(Date.now(), ms)
|
||||
}
|
||||
|
||||
public time(): number {
|
||||
const time = performance.now() - this.perf
|
||||
this.perf = performance.now()
|
||||
@@ -121,10 +125,6 @@ class Tree extends React.PureComponent<Props, State> {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
private performanceCallback = (ms: number) => {
|
||||
average.push(Date.now(), ms)
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = (state: AppState) => {
|
||||
|
||||
Reference in New Issue
Block a user