강의

멘토링

커뮤니티

Inflearn Community Q&A

jiindev0614's profile image
jiindev0614

asked

Applying TypeScript to React while learning while making web games

withRouter

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

Resolved

Written on

·

708

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)'.
 
라는 에러가 계속 뜨는데, 무슨 이유일까요? ㅠㅠ
typescriptreact

Answer 1

1

zerocho님의 프로필 이미지
zerocho
Instructor

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

jiindev0614's profile image
jiindev0614

asked

Ask a question