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

Ultimate React Component Patterns with TypeScript

Ultimate React Component Patterns with TypeScript

React and TypeScript, the ultimate duo for writing web apps with top notch developer experience. But where to start? What are the gotchas? In this live coding session we will cover all React Component patterns techniques backed by excellent DX and type safety with TypeScript ⚛⚛⚛.

Martin Hochel

July 20, 2019
Tweet

More Decks by Martin Hochel

Other Decks in Programming

Transcript

  1. Martin Hochel Principal Engineer @Productboard, GDE WEB, Microsoft MVP Prague

    / Czech Republic @martin_hotell medium.com/@martin_hotell github.com/hotell
  2. What this talk is NOT Deep dive about What is

    React ? What is TypeScript ?
  3. Render Prop / Children as a Function ( CaaF )

    <⚛> { (p) => <⚛> } </⚛> props.children(props) API
  4. D.R.Y. #1 ‍ Senior Dev (hook) ✅ #2 ‍ PM

    (Render Prop) ✅ #3 Functional dev (HoC) ✅
  5. What did we learn today ⚛⚡ State-full/less Un/Controlled High Order

    Component withCounter(()=>children(useCounter(p))) hooks ()=>useCounter(p) Render Prop ()=>children(useCounter(p))