-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/23 mainpage design #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
|
||
| type RequestMethod = 'get' | 'post' | 'put' | 'delete'; | ||
|
|
||
| export const requestHandler = async <R = undefined, T = undefined>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요 친구는 어디에 쓰이는 걸까요?
메소드를 함수형으로 호출하는 대신 string 인자를 통해 전달하는 것이 더 좋은 방식일까요?
| // Redux 상태 초기화 | ||
| dispatch(logout()); | ||
| // 토큰 제거 | ||
| removeToken(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
login의 경우에는 reducer 내부에서 토큰을 관리하는데, logout의 경우에는 왜 밖에서 관리할까요?
둘 중 어디가 정답이라고 할 수는 없겠지만, 적어도 양쪽이 같은 방식으로 해야 나중에 코드를 이해하기도 좋을 것 같아요!
그러고보니 login 시에도 미리 선언해둔 setToken 함수를 이용하면 더 좋겠네요 👀
#️⃣연관된 이슈
#23
📝작업 내용
스크린샷 (
선택)
로그인 x
로그인 o

💬리뷰 요구사항(선택)