Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Practical Flow Type

yayoc
July 14, 2017

Practical Flow Type

Slides presented at gotanda.js

Nobuhide Yayoshi

yayoc

July 14, 2017
Tweet

More Decks by yayoc

Other Decks in Programming

Transcript

  1. Hello! I am Nobuhide Yayoshi 弥吉修英 You can find me

    at @yayoc Frontend engineer, iOS At Fast Retailing
  2. Model Promise immutability [flow] property `username` (user.js:20:7) Covariant property `username`

    incompatible with contravariant use in assignment of property `username`
  3. Compare Typescript if you use Flow, you'll have much higher

    type coverage much faster and you'll be able to sleep soundly. http://thejameskyle.com/adopting-flow-and-typescript.html
  4. Swagger Flow Type A Swagger file has more than 8000

    lines Writing Type Definitions manually is HARD
  5. Conclusion ⊙ Utility types are useful ◦ $Exact ◦ $PropertyType

    ◦ Class ◦ Immutability ⊙ Prefer Flow than Proptypes ⊙ Prefer Generic Component ⊙ swagger-to-flowtype is useful
  6. Credits Special thanks to all the people who made and

    released these awesome resources for free: ⊙ Presentation template by SlidesCarnival ⊙ Photographs by Unsplash