반응형 개발/React54 index.html말고 헬멧 쓰는 이유 index.html에 메타태그 등 SEO관련 태그들을 작성하지 않고 굳이 헬멧을 사용하는 이유가 궁금했다. 한참 찾아보다가 시원한 답이 안나와서 그냥 팀원들에게 물어봤는데 간단했다. 각 페이지마다 다른 헤더를 적용하고 싶은 상황 때문이다.(예를들면 다른 메타태그를 사용하여 페이지마다 SEO를 차별화하고 싶을때) 만약 메타태그가 고정된다면 index.html에 그냥 박아넣어도 상관없음 2022. 5. 23. 에러 : React Hook "useEffect" is called conditionally. React Hooks must be called in the exact same order in every component render. React Hook "useEffect" is called conditionally. React Hooks must be called in the exact same order in every component render. 리액트 훅(나의 경우엔 useEffect)앞에 return 문이 있으면 발생하는 에러이다. useEffect뿐만 아니라 리액트 훅아래로 리턴문을 내려주면 해결된다. 2022. 3. 25. classnames 라이브러리 bb를 주목! bb가 true일때 import classNames from "classnames"; function App() { ..(생략).. 이렇게 쓰면 이다. bb가 false일때 import classNames from "classnames"; function App() { ..(생략).. 이렇게 쓰면 이다. 2022. 2. 15. Create-react-app 에러 : You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0). 아래 따라치면 됨 npm uninstall -g create-react-app npm add create-react-app npx create-react-app ./ 참고 https://velog.io/@milkyway/React-%EC%98%A4%EB%A5%98-%ED%95%B4%EA%B2%B0-You-are-running-create-react-app-4.0.2-which-is-behind-the-latest-release-4.0.3 2022. 2. 11. 이전 1 ··· 7 8 9 10 11 12 13 14 다음 반응형