Github like Calendar Heatmap(Contribution Summary) built from Scratch using React – JSitor


Very cool!

Minor suggestion: instead of Array.from(new Array(n)) to get an array of n length filled with undefined, use Array.from({ length: n }).

If you also need to map over those values immediately, you can pass a callback which does this without creating an intermediate array between .from and .map:

Array.from({ length: 4 }, (value, index) => index)[0, 1, 2, 3].

Author: Shantun Parmar

Leave a Reply

Your email address will not be published.