본문 바로가기
반응형

전체 글81

NVM(Node Version Manager) 빠르게 설치하기 맥OS에서 Node 버전을 변경하기 위해 NVM 설치가 필요했다 먼저 설치한 후 설치가 잘 됐는지 확인해본다 $ sudo curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash $ nvm ls 확인했는데 아래와 같이 나왔다면 당황하지 말고~ -bash: nvm: command not found 다음과 같이 명령어를 입력하면 된다 vi 에디터로 bash_profile 확인한다 $ vi ~/.bash_profile vi 에디터로 아래 코드가 있는지 확인한다 export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads .. 2022. 8. 9.
[NextJS] 새 탭에서 링크 열기 코드 테스트버튼 테스트버튼 더보기 참고 https://stackoverflow.com/questions/65632698/how-to-open-a-link-in-a-new-tab-in-nextjs https://stackoverflow.com/questions/67822028/link-to-target-blank-with-next-js 추가로 알면 좋을 것 같은 NextJS Link와 href의 관계 정리한 글 https://github.com/uu29/TIL/blob/main/%5BNextJS%5D%20Link%20%E1%84%90%E1%85%A2%E1%84%80%E1%85%B3%E1%84%8B%E1%85%AA%20href%E1%84%8B%E1%85%B4%20%E1%84%80%E1%85%AA%E1%86%AB%.. 2022. 8. 2.
웹 개발시 도움이 되는 꿀팁🍯 디자인 모드(Design Mode) 적용 웹 브라우저에서 임시로 화면을 수정하는 기능으로 개발자도구 콘솔창에 document.designMode="on" 을 입력하면 된다 디자인 모드를 끄고 싶다면 반대로 document.designMode="off" 를 입력하면 된다 브라우저 콘솔 활용 1. debugger 개발자 도구에서 원하는 객체의 값을 출력하는 용도로 쓰이는 console.log() 확인해야할 객체가 여러 개인 경우 console.log()를 하나하나 일일히 찍어야 하지만 debugger라는 명령어를 입력하면 간편하게 디버깅 작업을 할 수 있다 2. console.table() / console.dir() console.log()를 사용하는 일이 생길 때에는 console.tabel() 또는 c.. 2022. 7. 20.
[git error] fatal: invalid reference: 이동할_브랜치명 git switch 이동할_브랜치명 해당 명령어를 입력했는데 fatal: invalid reference: 이동할_브랜치명 이런 에러가 뜬다면 먼저 git pull로 신규 branch를 받아온 후에 git switch 이동할_브랜치명 명령어를 입력하면 이동하고자 하는 브랜치로 이동한다~~~ 2022. 7. 4.
[Javascript] Array Method map()과 foreach() 차이 Array Method에서 forEach를 쓸 때와 map을 쓸 때가 있다 같은 배열 메소드인데 어떤 차이가 있는지 알아보자 Array.prototype.map() 배열 내의 모든 요소 각각에 대하여 콜백 함수에 따라서 새로운 배열를 반환한다 const array1 = [1, 4, 9, 16]; // pass a function to map const map1 = array1.map(x => x * 2); console.log(map1); // expected output: Array [2, 8, 18, 32] map()은 기존 배열을 이용해 새로운 배열을 생성하므로 새 배열을 얻고 싶다면 map()을 사용할 것을 권장한다 요소가 아닌 새로운 값을 만들기 때문에 return을 할 수 있고 return 값.. 2022. 6. 29.
맥(Mac)용 웹스톰(WebStorm) 단축키 정리 VSCode로 코드를 짰었는데 회사에서 웹스톰을 쓰게 되어 에디터를 변경했다 그런데 이게 무슨 일? VSCode 단축키랑 웹스톰 단축키랑 완전 달라달라!!! 그리하여 맥용 웹스톰 단축키를 서치해서 정리해보았다 ✔️ 맥용 웹스톰 단축키를 살펴보기 전에 맥심볼 기호부터 체크! ⌘ : Command / ⇧ : Shift / ⌃ : Control / ⌥ : Option / ↵ : Enter, Return / ⇥ : Tab 기능 설명 단축키 (Navigator에서) 새 파일 생성하기 Control + Return preference 열기 Command + , 전체 검색 Shift + Shift 정의로 이동 Command + B / Command + Click 코드 라인 상하로 옮기기 Shift + ⌥ + 위/아래.. 2022. 6. 23.
react-admin error: Warning: A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input eleme.. Warning: A component is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. Select의 value에 undefined가 들어가서 처리할 수 없다는 에러가 떴다 왜 이런 에러가 떴나 하고 보니.. Select에 value를 지정해주지 않았음... ... Select에 value를 넣어주고 useSta.. 2022. 5. 6.
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.
반응형