Hacker News new | ask | show | jobs
by iandanforth 3874 days ago
Cacheing? You're doing a lot of work in render that could be computed once. Try saving a few years +/- into state on componentDidMount. And for day clicks, pull rows that arn't touched from the cache.
1 comments

Will surely do, thanks! Also, how did you test the onClick delay? by spamming timestamps in the code? :D
No, you open up the Chrome Dev Tools, click the Timeline tab and then start recording. Click a few days in the calendar, stop the recording and then you'll see that after each click it takes 100ms until paint events are shown.
Use the Chrome's "Profiles" tab in DevTools.