These are some technical considerations for the Kalender component. It returns a calendar matrix containing day objects for a given month. It's implementation is an experiment in writing a Javascript component in a functional style.
When starting I keep things in one file even when there are multiple modules in it. No need to split things up until the it grows to about 150 lines. After 150 lines it gets harder to keep clarity and concepts need to be separated, named and have it's own place.
At the start of the project I mindlessly added lodash, thinking I'd be really needing helper functions like reduce and contains. Turned out I'd could do without. This makes a big difference dependency wise, the library now only has dependencies for building and testing but none are required to get things running.
Removing reduce and contains forced me to think about data structures a bit more. I like objects as data struc