인프런 커뮤니티 질문&답변
no overload matches this call
작성
·
308
0
TS2769: No overload matches this call.
Overload 1 of 3, '(loadFn: (props: unknown) => Promise<DefaultComponent<unknown>>, options?: OptionsWithoutResolver<unknown> | undefined): LoadableComponent<unknown>', gave the following error.
Type 'Promise<typeof import("/workspace/chatting_app/alecture/layouts/Workspace/index")>' is not assignable to type 'Promise<DefaultComponent<unknown>>'.
Type 'typeof import("/workspace/chatting_app/alecture/layouts/Workspace/index")' is not assignable to type 'DefaultComponent<unknown>'.
Property 'default' is missing in type 'typeof import("/workspace/chatting_app/alecture/layouts/Workspace/index")' but required in type 'DefaultImportedComponent<unknown>'.
Overload 2 of 3, '(loadFn: (props: any) => Promise<ComponentClass<any, any> | { default: ComponentClass<any, any>; }>, options?: Options<any, ComponentClass<any, any>> | undefined): LoadableClassComponent<...>', g
ave the following error.
Type 'typeof import("/workspace/chatting_app/alecture/layouts/Workspace/index")' is not assignable to type 'ComponentClass<any, any> | { default: ComponentClass<any, any>; }'.
Property 'default' is missing in type 'typeof import("/workspace/chatting_app/alecture/layouts/Workspace/index")' but required in type '{ default: ComponentClass<any, any>; }'.
const LogIn = loadable(() => import('@pages/LogIn'));
const SignUp = loadable(() => import('@pages/SignUp'));
const Workspace = loadable(() => import('@layouts/Workspace'));
제로초님 아무리 노력해도 어디가 문제인지 못찾겠습니다 어디서부터 어떻게 해결해야 할까요??
퀴즈
재사용성, 가독성 향상, 복잡성 관리를 위해 UI 요소를 분리하여 컴포넌트로 만드는 주된 이유는 무엇일까요?
각 컴포넌트의 스타일을 다르게 적용하기 위해
디버깅 시 오류 추적을 쉽게 하기 위해
불필요한 props 전달을 피하기 위해
코드 재사용성을 높이고 관리 복잡성을 줄이기 위해





구름ide자체 문제인 것 같습니다 감사합니다!