1. Create React App + TypeScript
  2. Writing a Function component
  3. Basic TypeScript types
  4. Writing a Class component
  5. React Hooks
  6. Commenting and Docz

first fix package.json

  "resolutions": {
    "ansi-styles": "^3.2.0"
  }

then yarn add -D docz-theme-default docz@0.12.17
then scripts docz": "docz dev"
then doczrc.js

// doczrc.js
export default {
  typescript: true
};

and then write MDX

---
name: My Awesome Button Component
route: /
---

import { PropsTable, Playground } from 'docz';
import Button from './Button';

## This is your Button component

Lorem ipsum

<Playground>
  <Button text="helloworld" state="error" />
  <Button text="helloworld" state="success" />
</Playground>

Dolor sit

<PropsTable of={Button} />

Amet consecitur
  1. Some advanced stuff - typeof, in/union types
  2. DefinitelyTyped
  3. Here be dragons
    • Linting: TSLint vs ESLint
    • Bikeshedding: Multiple ways to do things
    • Generic Type Logic
  4. Why React + TypeScript?

Why do you test JS? Correctness.

  1. People moving to TypeScript
  • Jest
  • Expo
  • react-beautiful-dnd
  • Storybook
  • VueJS
  • AirBnb
  • Google
  • Palantir
  • Atlassian

https://twitter.com/swyx/status/1082290067937275904