강의

멘토링

커뮤니티

Inflearn Community Q&A

wlahdl940921's profile image
wlahdl940921

asked

Node and React series that you can learn by following - Basic lecture

Node React Basics Lecture #32 Logout

TypeError: Cannot read properties of undefined (reading 'push') 가 계속 뜹니다.

Resolved

Written on

·

3.2K

2

로그아웃 기능을 따라하던 중 계속 push 오류가 뜹니다.

로그아웃만 하면 잘 실행되는데 로그인 화면으로 가는 기능을 실행할 때 오류가 뜹니다.

TypeError: Cannot read properties of undefined (reading 'push')

코드에 오타도 없습니다.

검색 중 withRouter를 사용해야한다는 글을 보고 따라해봤는데 버전이 안맞는지 오류가 너무 많이 뜨더라구요... 

push가 안되는 것도 버전 문제라고 하는데 다운그래이드 말고 다른 방법 없을까요?

reactnodejs

Answer 3

5

wlahdl940921님의 프로필 이미지
wlahdl940921
Questioner

해결했습니다. 

Auth 부분 강의 듣다가 Auth도 get인데 같은 방식으로 해보자 하고 시도했더니 됐습니다.

혹시나 저랑 같은 문제로 계속 오류 뜨시는 분들 도움 되셨으면 좋겠어서 코드 올려 놓고 갑니다

 

Landingpage

user_action

user_reducer

0

와 감사합니다.

0

John Ahn님의 프로필 이미지
John Ahn
Instructor

해결된 부분 공유해주셔서 감사합니다 !!! 

wlahdl940921's profile image
wlahdl940921

asked

Ask a question