React.NamedExoticComponent
타입을 활용하면 된다. (React.memo
의 반환 타입)interface Props { title?: string | Element; canGoBack?: boolean; } export const AppHeader: NamedExoticComponent<Props> = memo( ({ title, canGoBack }) => { ... return(<컴포넌트 />) });
React.NamedExoticComponent
<Props>React.NamedExoticComponent
타입을 활용하면 된다. (React.memo
의 반환 타입)interface Props { title?: string | Element; canGoBack?: boolean; } export const AppHeader: NamedExoticComponent<Props> = memo( ({ title, canGoBack }) => { ... return(<컴포넌트 />) });