For normal React components, I can see the correct auto-completion for component's props like this:

But I try to create a component with React.forwardRef like below, it does not work, any idea?
export default React.forwardRef<unknown, BaseModalProps & FeedbackDetailsContentProps>((props: BaseModalProps & FeedbackDetailsContentProps, ref) => {
return (
<BaseModal {...props} onlyDisplayOkButton ref={ref} width={600}>
<FeedbackDetailsContent {...props} />
</BaseModal>
);
});

You should replace unknown with specified HTML Element type, eg. HTMLInputElement, and also type specified for props is unnecessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With