As it stands right now, you can't style components that use a forwardRef wrapper, which forced me to cast them to any.
Example
const MyForwardRefComponent = React.forwardRef((props, ref) => <h1 ref={ref}>Hello World</h1>);
// does not work
const StyledMyForwardRefComponent1 = styled(MyForwardRefComponent, {...});
// does work
const StyledMyForwardRefComponent2 = styled(MyForwardRefComponent as any, {...});
As it stands right now, you can't style components that use a
forwardRef
wrapper, which forced me to cast them to any.Example
Would appreciate if this received a fix.