typescript debugging 익숙해지기
React.forwardRef((props, ref) => <p ref={ref} id="sentinel" />);'Ref<{}>' 형식은 'string | ((instance: HTMLParagraphElement | null) => void) | RefObject<HTMLParagraphElement> | null | undefined' 형식에 할당할 수 없습니다.
'RefObject<{}>' 형식은 'string | ((instance: HTMLParagraphElement | null) => void) | RefObject<HTMLParagraphElement> | null | undefined' 형식에 할당할 수 없습니다.
'RefObject<{}>' 형식은 'RefObject<HTMLParagraphElement>' 형식에 할당할 수 없습니다.
Type '{}' is missing the following properties from type 'HTMLParagraphElement': align, addEventListener, removeEventListener, accessKey, and 238 more(parameter) ref: React.Ref<{}>function forwardRef<T, P = {}>(
Component: RefForwardingComponent<T, P>
): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;Last updated
Was this helpful?