강의

멘토링

로드맵

인프런 커뮤니티 질문&답변

진현서님의 프로필 이미지
진현서

작성한 질문수

Slack 클론 코딩[실시간 채팅 with React]

사용자 초대 모달 만들기

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 전달을 피하기 위해

코드 재사용성을 높이고 관리 복잡성을 줄이기 위해

답변 1

1

제로초(조현영)님의 프로필 이미지
제로초(조현영)
지식공유자

Workspace/index.tsx에서 export default 안 하신 것 아닌가요?

진현서님의 프로필 이미지
진현서
질문자

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

진현서님의 프로필 이미지
진현서

작성한 질문수

질문하기