Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleReset = () => {
trace('Clear cache', performance.now(), () => {
// TODO: this is not implemented.
// cache.invalidate();
this.setState(state => ({
requests: {},
}));
handleReset();
});
};
() => {
trace('cascade', performance.now(), () => {
setTimeout(
wrap(() => {
batchedUpdates(() => {
setCount(count + 1);
setShouldCascade(true);
});
}),
count * 100,
);
});
},
[count],
scrollToRow300Center = () =>
trace('scroll to row 300', performance.now(), () =>
this.listRef.current.scrollToItem(300, 'center')
);
scrollToRow250Smart = () => {
trace('scroll to row 250', performance.now(), () =>
this.listRef.current.scrollToItem(250, 'smart')
);
};
_handleClick () {
trace('Clap was clicked!', window.performance.now(), () => {
this._animationTimeline.replay()
this.setState(function (prevState, nextState) {
return {
count: Math.min(prevState.count + 1, 50),
countTotal: prevState.countTotal + 1,
isClicked: true
}
})
})
}
() => {
trace('first', performance.now(), () => {
trace('second', performance.now(), () => {
setTimeout(
wrap(() => {
setCount(count + 1);
}),
count * 100,
);
});
});
},
[count],
const reactProfilerMiddleware = store => next => action => {
const { type } = action;
return trace(`[redux] ${type}`, performance.now(), () => next(action));
};
scrollToRow200Auto = () =>
trace('scroll to row 200', performance.now(), () =>
this.listRef.current.scrollToItem(200)
);
scrollToRow300Center = () =>
handleBackClick = () =>
trace('View list', performance.now(), () =>
this.setState({
currentId: null,
showDetail: false,
})
);
() => {
trace('count', performance.now(), () => {
setTimeout(
wrap(() => {
setCount(count + 1);
}),
count * 100,
);
});
},
[count],