Latest Posts
Changes I would make to Go
To highlight exactly how I think Go could be better, I want to make comparisons to Rust.
Flow Cookbook: Flow & React
This recipe is part of the Flow Cookbook series. Flow and React are both Facebook projects - so as you might imagine, they work quite well together. React components can take type parameters to specify types for props and state. Type-checking works well with both functional and class components. Flow type annotations provide an alternative to propTypes runtime checks. Flow’s static checking has some advantages: Problems are reported immediately - it is not necessary to run tests that evaluate every component to identify props mismatches. Flow types can be more precise and concise than propTypes. Flow can also check state as well as props. In addition to checking that a component gets the correct props, Flow checks that props and states are used correctly within the component’s render method, and in other component methods. …
Flow Cookbook: Unpacking JSON API data
A case study on using runtime validators to match incoming API data to Flow types