본문 바로가기
반응형

개발이야기65

[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.
반응형