REACT
-
component를 직접변경하는 경우의 오류해결REACT 2021. 12. 14. 21:58
문제는 로그인 컴포넌트를 만드는 경우에 발생했다. //RunLogin.tsx const RunLogin = ({ id, passwd, setRunLogin, setFailedAlarm, offFailedAlarm }: RunLoginTypeProps) => { const { loading, data } = useQuery(GET_USER_INFO, { variables: { userId: id, }, }); if (!loading) { if (data.personByUserId === null) { /* console.log("존재하지 않는 아이디 입니다"); */ setRunLogin(false); } else if (passwd !== data.personByUserId.password) { cons..