강의

멘토링

커뮤니티

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của jiindev0614
jiindev0614

câu hỏi đã được viết

Ứng dụng TypeScript vào React đã học khi làm web game

withRouter

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

Đã giải quyết

Viết

·

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

Câu trả lời 1

1

zerocho님의 프로필 이미지
zerocho
Người chia sẻ kiến thức

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

Hình ảnh hồ sơ của jiindev0614
jiindev0614

câu hỏi đã được viết

Đặt câu hỏi