News for hackers. Stuff that matters.
Re:Show HN: A React.js yearly calendar component by iandanforth on Monday November 16, 2015 @10:31AM (#10574950)
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.
Re:Show HN: A React.js yearly calendar component by GiovanniFrigo on Monday November 16, 2015 @10:40AM (#10575005)
Will surely do, thanks! Also, how did you test the onClick delay? by spamming timestamps in the code? :D
Re:Show HN: A React.js yearly calendar component by sirrocco on Monday November 16, 2015 @11:19AM (#10575245)
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.
Re:Show HN: A React.js yearly calendar component by exizt88 on Monday November 16, 2015 @11:15AM (#10575221)
Use the Chrome's "Profiles" tab in DevTools.