Impact of Polymorphism on Component-Based Frameworks Like React

I just realized that this is going to be the very first blog post of 2018 that I write myself – versus bugging someone else to write a blog post. It’s been quite a busy year for me already, plus I was sick a lot, and so was my family. Anyways, here’s something I’ve been meaning to send out for a while. And while the title mentions React explicitly, this is by no means limited to React, but probably affects a lot of code out there, including a lot of Node.js code bases, where this impact is even more severe.
I’ve written a blog post on Surprising polymorphism in React applications earlier and this post goes in the same direction, although we’ll explore a slightly different problem here. For more background on the topic, you may want to read What’s up with monomorphism? and Explaining JavaScript VMs in JavaScript – Inline Caches by my colleague Vyacheslav Egorov.