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) ➞ .



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store



Hello! I’m Shantun Parmar. Software Developer with over 3 years of experience specializing in Backend development.