강의

멘토링

로드맵

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

정중한 전어님의 프로필 이미지
정중한 전어

작성한 질문수

웹 게임을 만들며 배우는 React에 TypeScript 적용하기

withRouter

Property 'render' does not exist on type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'.

해결된 질문

작성

·

713

0

 <div>
                <Routes>
                    <Route path="/" render={(props) => <GameMaster {...props}/>}/>
                    <Route path="/game/:name" render={(props) => <GameMaster {...props}/>}/>
                </Routes>
            </div>
해당 코드에서
 
Property 'render' does not exist on type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'.
 
라는 에러가 계속 뜨는데, 무슨 이유일까요? ㅠㅠ

퀴즈

React Router에서 현재 라우트 정보(경로, 파라미터 등)와 네비게이션 기능(페이지 이동)을 제공하는 세 가지 핵심 객체는 무엇일까요?

Router, Switch, Link

Component, Render, Children

History, Location, Match

Params, Search, Pathname

답변 1

1

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

리액트라우터 6버전으로 하시는건가요? 강좌는 5버전입니다. 6버전은 코드 깃헙에만 있습니다.

정중한 전어님의 프로필 이미지
정중한 전어

작성한 질문수

질문하기