Reactjs – How to specify that forwardRef is optional in a React component?
CodeSandbox Example for this issue. I have defined an icon library that exports several icons. Each Icon forwards a ref to its internal svg. Here's an example: type ReactIconProps = SVGProps<SVGSVGElement>; function CheckIconInner(props: ReactIconProps, ref: Ref<SVGSVGElement>) { return ( <svg…