Imagine a simple a Radio component, what returned its passed value prop on mouse click. It’s easily typable as a string, and flow won’t complain about it.
But what about if we wrap this component into an other where we dinamically create these radio components with mapping through a union typed Array.
As it turns out, when you try to access an element in an array, flow will give you no errors, even though the given index might be out of bounds for the array. So accessing an element of
Array<T> will always be of type
T, and you need to remember yourself to check its existence.
Zoli recently implemented a new Blocknode, called DeletedEmbed, which we display in place of embeds that have been deprecated. We have a subset of Blocknodes called FeaturedMedia, consisting of a bunch of image / video nodes, and now the new DeletedEmbed. Some issues arose from this addition though. The root cause of…