Closed tu4mo closed 3 years ago
Thanks for your feedback!
HeadingProps
are exported as an example to follow conventions set by libraries. Each component’s corresponding prop types are made available alongside the component itself, e.g.:
import { Heading, HeadingProps } from "@/components/Heading";
React.ForwardedRef
is available in a separate @react/types
package (which is marked as a peer dependency).
Oh, I had types for React 16 installed. Thanks!
I'm trying to figure out the example for forwardRef'd component.