Convert React Components
React Function Component
React Component without Props
<Footer />
: rename footer.jsx
to footer.tsx
footer.tsx
tsx
const Footer = () => <footer>Malcolm Kee ©</footer>;
render(<Footer />);
footer.tsx
tsx
const Footer = () => <footer>Malcolm Kee ©</footer>;
render(<Footer />);
React Component with Props
Using React.ReactNode
Using Union Types for props
Using JSX.IntrinsicElements
<Table />
<PanelBody />
, <PanelFooter />
, <PanelHeading />
Typing React.forwardRef
React Class Component
React Context