As of TypeScript 5.1 and React 18, it's now a perfectly fine way to type your components. The main criticism of came from its earlier iteration, which included in the props type. This meant that if you wanted to type a component that didn't accept children, you couldn't use.

3m read timeFrom totaltypescript.com
Post cover image
Table of contents
Quick BreakdownExplanation

Sort: