Whenever I wrap a FC in React.forwardRef, styleguidist always picks the name ForwardRefExoticComponent.
I've tried
/**
* @visibleName FileSelect
*/
const FileSelect = React.forwardRef((props, ref) => ... )
FileSelect.displayName = "FileSelect";
/**
* @visibleName FileSelect
*/
export default FileSelect;
/**
* @visibleName FileSelect
*/
const FileSelectFC: React.RefForwardingComponent = (props, ref) => { ... };
FileSelectFC.displayName = "FileSelect"
/**
* @visibleName FileSelect
*/
const FileSelect = React.forwardRef(FileSelectFC);
FileSelect.displayName = "FileSelect";
/**
* @visibleName FileSelect
*/
export default FileSelect;
but doesn't seem to work.
Is it not supported?
the solution for us was to wrap the exported component into a react function
export default Input as React.FC<React.HTMLProps<HTMLInputElement> & ComponentProps>;
馃槾 This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week without any further activity. Consider opening a pull request if you still have this issue or want this feature.
Most helpful comment
the solution for us was to wrap the exported component into a react function
export default Input as React.FC<React.HTMLProps<HTMLInputElement> & ComponentProps>;