Skip to content
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

[IS-01-Q] saga안에서 redirecting 불가 #14

Open
CHEWCHEWW opened this issue Apr 17, 2021 · 0 comments
Open

[IS-01-Q] saga안에서 redirecting 불가 #14

CHEWCHEWW opened this issue Apr 17, 2021 · 0 comments

Comments

@CHEWCHEWW
Copy link
Collaborator

참고 https://react.vlpt.us/redux-middleware/12-redux-saga-with-router.html

redirect 액션함수를 만들어서 컨테이너/컴포넌트에서 라우팅하는 것은 가능하지만,
구글 로그인 플로우상 추가로 then과 같이 콜백 함수를 걸어주지 않는 이상 우리 서버에 연동되었는지 여부를 체크할 수 없을 것 같다고 생각했습니다..
그래서 api 로직이 성공적으로 처리되면 saga안에서 redirecting을 하고자했으나..
history를 직접 제어하는 것 이외의 해결 방법을 찾지 못했습니다..

따라서 login page container 안에서 token의 유무를 판별하여 직접 리다이렉팅을 해주는 방식으로 구현을 했는데,
더 좋은 방법이 있을 것 같습니다. 같이 공유 부탁드립니다!

  • login page container와 login page 둘중 어디서 redirecting을 하는 것이 좋을지.. 같이 고민해주시면 감사합니다!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant