본문 바로가기
반응형

개발이야기65

react-admin error: React does not recognize the 'basePath' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase 'basepath' instead. If you accidentally passed it from a parent component, r.. Warning: React does not recognize the 'basePath' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase 'basepath' instead. If you accidentally passed it from a parent component, remove it from the DOM element. 위와 같은 에러가 났다... 왜 이런 에러가 났는가 상황을 본다면 Table을 만들고 나서 에러가 생김 제목 내용 밤편지 이 밤 그날의 반딧불을 당신의 창 가까이 보낼게요 사랑한다는 말이에요 저 에러가 무슨 에러인지 찾아보.. 2022. 4. 28.
[React] TypeScript - type과 interface TypeScript에서는 props 타입을 선언할 때 type과 interface를 사용한다 둘 다 타입을 선언한다는 공통점이 있지만 이 둘은 다르다 type 객체 타입 뿐 아니라 모든 타입에 대해 새로운 이름을 붙일 수 있다 // 예문 type TUser = { id: number; name: string; }; const typeUser: TUser = { id: 0, name: '김하나', }; interface 객체 타입을 만드는 또 다른 방법이다 // 예문 interface IUser = { id: number; name: string; }; const interfaceUser: IUser = { id: 0, name: '김하나', }; 확장하기 // interface 확장하기 interface.. 2022. 4. 6.
기본 노드(global nodejs) 버전 변경 하기 node js 버전 확인 및 변경하는 방법은 아래 포스팅을 참고해주세요 NVM을 이용한 Node JS 버전 변경하기 Node JS 버전 확인하기 $ node -v NVM 설치하기(brew 이용하여 설치 https://brew.sh/index_ko) brew를 설치한 후 아래 코드 실행 $ brew install nvm NVM 환경변수 설정하기(zsh) $ vi ~/.zshrc zshrc 설정 파일.. hyung1.tistory.com NVM으로 노드 기본 버전 변경하기 nvm alias default v12.22.1 명령어를 이용하여 사용하고자 하는 노드 버전을 설정해주면 새로운 터미널을 열 때마다 새로 설정해둔 노드버전으로 적용된다 2022. 3. 29.
에러메시지 error: Command failed with exit code 1 프로젝트 시작시 발생한 에러 error: Command failed with exit code 1 1. yarn 으로 생성된 node_modules, yarn.lock 지우기 rm -rf node_modules rm -rf yarn.lock 2. yarn 공유 캐시 파일 지우기 yarn cache clean 3. yarn 재설치 후 시작하기 yarn yarn start or 1. yarn 업데이트 후 yarn 시작하기 yarn update yarn start 2022. 3. 28.
NVM을 이용한 Node JS 버전 변경하기 Node JS 버전 확인하기 $ node -v NVM 설치하기(brew 이용하여 설치 https://brew.sh/index_ko) brew를 설치한 후 아래 코드 실행 $ brew install nvm NVM 환경변수 설정하기(zsh) $ vi ~/.zshrc zshrc 설정 파일에 아래 코드를 복붙한다 export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh 아래 명령어로 환경변수 파일 적용한다 $ source ~/.zshrc NVM 설치 확인하기 $ nvm --version // or $ nvm -v 특정 버전의 node.js 설치하기 $ nvm install 16.13.0 설치된 특정 버전의 node.js 사용하기 먼저 설치되어 있는 node.js 버전.. 2022. 3. 21.
React-query 시작하기 새 프로젝트에 React에서 비동기 로직을 쉽게 다루게 해주는 라이브러리 React-query를 사용하기로 결정이 났다 그래서 React-query를 공부하면서 블로그에 끄적여본다 개요 React Query는 종종 누락된 데이터 가져오는 라이브러리로 설명되지만, 보다 기술적인 용어로 말하면 React 애플리케이션에서 fetching(가져오기), caching(캐싱), synchronizing and updating server state(동기화 및 서버상태 업데이트)를 수행한다 기본 코드 import { QueryClient, QueryClientProvider, useQuery } from 'react-query' const queryClient = new QueryClient() export defa.. 2022. 3. 16.
반응형