You only need a little bit of TypeScript knowledge to be dangerous with React
- Type your inputs, infer your outputs
- Use React.ComponentProps everywhere
- Use Omit<> when overriding props
- Don't pass types from the DB into your components
https://www.jacobparis.com/content/react-ts
- Type your inputs, infer your outputs
- Use React.ComponentProps everywhere
- Use Omit<> when overriding props
- Don't pass types from the DB into your components
https://www.jacobparis.com/content/react-ts
Comments