-
카테고리
-
세부 분야
풀스택
-
해결 여부
미해결
로그인 상태체크
22.11.21 14:32 작성 조회수 288
0
useEffect(() => {
dispatch(auth()).then(response => {
// console.log(response)
//로그인 하지 않은 상태
if (response.payload.isAuth) {
console.log('로그인 상태')
}else{
//로그인한 상태
console.log('로그인 아닌 상태')
}
})
}, [])
//import { auth } from '../../../_actions/user_action';
를 이런식으로 사용하면 안되는 이유가 있나요?
답변을 작성해보세요.
답변 0