- Create React App + TypeScript
- Writing a Function component
- Basic TypeScript types
- Writing a Class component
- React Hooks
- 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
- Some advanced stuff - typeof, in/union types
- DefinitelyTyped
- Here be dragons
- Linting: TSLint vs ESLint
- Bikeshedding: Multiple ways to do things
- Generic Type Logic
- Why React + TypeScript?
Why do you test JS? Correctness.
- People moving to TypeScript
- Jest
- Expo
- react-beautiful-dnd
- Storybook
- VueJS
- AirBnb
- Palantir
- Atlassian
https://twitter.com/swyx/status/1082290067937275904