Yesterday we deployed Flow v0.21.0! As always, we’ve listed out the most interesting changes in the Changelog. However, since I’m on a plane and can’t sleep, I thought it might be fun to dive into a couple of the changes! Hope this blog post turns out interesting and legible!
If you’re writing JSX, it’s probably a mix of your own React Components and some intrinsics. For example, you might write
return <div><FluffyBunny name="Fifi" /></div>;
In this example,
FluffyBunny is a React Component you wrote and
div is a JSX intrinsic. Lower-cased JSX elements are assumed to be intrinsics by React and by Flow. Up until Flow v0.21.0, Flow ignored intrinsics and gave them the type
any. This meant Flow let you set any property on JSX intrinsics. Flow v0.21.0 will, by default, do the same thing as v0.20.0, However now you can also configure Flow to properly type your JSX intrinsics!