Live data from Hacker News

Show HN: A React.js yearly calendar component

github.com

11–20 of 49 posts

Re: Show HN: A React.js yearly calendar component

#11
post #9

100 ms delay on every click (measured in Chrome's Profiles tab). I'm on a 2013 MBP. Seems a bit too much for making a number bold.

Any idea on how one could optimize the rendering function to reduce this lag (which BTW I can barely see on my 2015 MBP)?

Re: Show HN: A React.js yearly calendar component

#15
post #9

100 ms delay on every click (measured in Chrome's Profiles tab). I'm on a 2013 MBP. Seems a bit too much for making a number bold.

Any idea on how one could optimize the rendering function to reduce this lag (which BTW I can barely see on my 2015 MBP)?

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

#16
post #14

Is that really worth showing to HN? I mean, I dont want to be rude -- your code is ok, no problem here -- but it's not even a library, it is just a widget in 200 LOC, that renders a single table. What's the achievement here?

imho, this is worth showing as a piece of design.

Its an innovative calendar layout and while I don't know if I would use it in time / data selection, in terms of visualizing data inside of a year it has a lot of potential.

Re: Show HN: A React.js yearly calendar component

#17
post #14

Is that really worth showing to HN? I mean, I dont want to be rude -- your code is ok, no problem here -- but it's not even a library, it is just a widget in 200 LOC, that renders a single table. What's the achievement here?

Is that comment really worth sharing on HN? I mean, I don't want to be rude - the English is ok, no problem here - but it's not useful at all, it's just complaining about a thing upvoted by 50 people. What's the purpose here?

Re: Show HN: A React.js yearly calendar component

#18
post #14

Is that really worth showing to HN? I mean, I dont want to be rude -- your code is ok, no problem here -- but it's not even a library, it is just a widget in 200 LOC, that renders a single table. What's the achievement here?

Yeah, that's a component, no more, no less.

I just wanted to share this, I think some people disagree with you if I am in homepage right now

Re: Show HN: A React.js yearly calendar component

#19

Earlier quoted context omitted.

Any idea on how one could optimize the rendering function to reduce this lag (which BTW I can barely see on my 2015 MBP)?

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.

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

#20
post #14

Is that really worth showing to HN? I mean, I dont want to be rude -- your code is ok, no problem here -- but it's not even a library, it is just a widget in 200 LOC, that renders a single table. What's the achievement here?

imho, this is worth showing as a piece of design. Its an innovative calendar layout and while I don't know if I would use it in time / data selection, in terms of visualizing data inside of a year it has a lot of potential.

You definitely won't use this for date selection, but we found it useful to layout the whole year and to review it at a glance.

Thanks for your kind words anyway! :)

Post reply on HN