문제상황: Nomad Coders의 트위터 클론코딩 강의의 #6.0 Cleaning JS (08:54) 의 github코드를 사용하여 테스트해보는 중 Home화면에서 Profile로 넘어가는 버튼 클릭시 1. Warning: Cannot update a component (`App`) while rendering a different component (`Unknown`). To locate the bad setState() call inside `Unknown` 2. Profile.js에서 Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or ..
문제상황: Nomad Coders의 트위터 클론코딩 강의의 #2.6 Log Out (06:37) 를 듣던 중 Profile.js에서 export 'useHistory' (imported as 'useHistory') was not found in 'react-router-dom'에러 로그 발생 · Profile.js import React from "react"; import { authService } from "fbase"; import { useHistory } from "react-router-dom"; export default () => { const history = useHistory(); const onLogOutClick = () => { authService.signOut(); his..
문제상황: 노마드 코더 React JS 마스터클래스의 #3.1 DefinitelyTyped에서 typescript를 사용하기 위해 다음과 같은 과정을 거쳤다. 1. typescript 를 설치하기위해 콘솔에 다음 커맨드 입력 --> npm install --save typescript @types/node @types/react @types/react-dom @types/jest 2. App.js,index.js의 확장자를 .tsx로 변경(React typescript를 사용할 경우의 확장자) 3. 기존의 'styled-components'는 typescript가 아닌 javascript로 쓰여있으므로 다음 커맨드 입력--> npm i --save-dev @types/styled-components (@..