I know you care about optimizing your code but sometimes you don’t know how to do it.
Imagine every piece of your code is well optimized, the performance would be great and you can easily investigate your code if having any issue.
This week, I had to construct a date selector form in React that looks like this. As you can see, the user interface includes the surrounding month and date options in addition to the selected date. This means that I need to not only keep track of the current date, but I also need a way to conveniently figure out how many days are in the selected month.