분류 전체보기
-
에러카테고리 없음 2022. 6. 15. 16:14
1. firebase 웹앱 추가하고, 설정을 써주고 코드를 제대로 썼는데도 firebase 데이터 저장이 전혀 동작하지 않았다. default form submit event 막아주지 않아서 로그를 확인할 수 없어서 생긴 문제였다. 회원가입 form 을 넘길 때 e.preventDefault(); 를 써주지 않았더니 firebase 가 동작하는지 아닌지 확인할 방법이 없었다. 로그가 firebase 진입 전에는 찍히는 데 진입 이후 성공했는지 여부가 안나왔던 것. form submit event 때문에 페이지가 바뀌어 버렸는데 e.preventDefault(); 를 써주니 firebase 에러 메시지가 나왔다. 에러 메세지: Error adding document: FirebaseError: Missin..
-
styled components 동적 prop 과 type 지정프로그래밍/React 2022. 6. 10. 17:47
styled component 동적 style 주기 위해서는 간단히 props => props.name 해주면 된다. 해당 props 를 넘겨서 생기는 type 문제는 태그 바로 옆에 로 붙여서 써주면 된다. const BgImg = styled.div` background-image: url(${(props) => props.background}); height: 15rem; ... `; 흔하게 생기는 no overload matches this call. 어쩌구 하면서 엄청 긴 에러는 마지막 줄에 보니까 undefined 어쩌구가 있어서 야매지만 type 에 undefined 를 붙여주니까 사라졌다 const BgImg = styled.div` background-image: url(${(props)..
-
Client CORS 문제 해결프로그래밍/Javascript 2022. 6. 10. 07:14
에러 Access to XMLHttpRequest at '주소' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. package.json 에 "proxy" 하고 api 요청을 받아오는 서버쪽 호스트 주소를 넣어주면 된다 예를 들어 api 주소가 https://yts.torrentbay.to/api/v2/ 라면 { /* package.json */ ... "proxy" : "http..
-
windows.scrollY 의 쓰임프로그래밍/TIL 2022. 4. 27. 12:24
Window.scrollY The read-only scrollY property of the Window interface returns the number of pixels that the document is currently scrolled vertically. if (window.scrollY) { window.scroll(0, 0); // reset the scroll position to the top left of the document. } IE 호환성 지원을 위해 다른 property 를 써줘야 하기도 한단다 자세히 보면 https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY Window.scrollY - Web APIs | M..
-
JS !! 논리연산자프로그래밍/TIL 2022. 4. 27. 12:17
!! 는 확실한 논리결과 boolean 결과를 가지기 위해 사용한다 undefined, null, "" 의 경우 false 로 처리되고 나머지 결과는 true 이다 위의 세 결과값, 즉 다른 타입의 데이터를 정확한 boolean 값으로 치환해주기 위해 !!를 써준다 https://hermeslog.tistory.com/279 자바스크립트 (JavaScript) 느낌표 두개 (Double Exclamation Marks) 연산자 (Operator), !! 정리하자면 느낌표 두개(!!) 연산자는 확실한 논리결과를 가지기 위해 사용합니다. 예를 들어 정의되지 않은 변수 undefined 값을 가진 내용의 논리 연산 시에도 확실한 true / false를 가지도록 하는 hermeslog.tistory.com h..
-
vscode 설정프로그래밍/TIL 2022. 4. 27. 11:01
✔ 마지막줄 공백 추가하는 설정 On / Off VSCode 메뉴: [File] >> [Preferences] >> [Settings] "Trim Trailing Whitespace" 으로 검색 >> [Trim Trailing Whitespace] 항목에 On / Off 체크 Off 하면 공백 추가 설정이 사라진다 https://codedragon.tistory.com/9673 VSCode (VisualStudio Code) - 줄 끝 공백 제거하기 VSCode - 줄 끝 공백 제거하기 VSCode 메뉴: [File] >> [Preferences] >> [Settings] "Trim Trailing Whitespace" 으로 검색 >> [Trim Trailing Whitespace] 항목을 체크합니다. ..
-
Windows Local Https 환경 설정프로그래밍/TIL 2022. 4. 27. 10:55
✔ Chocolatey chocolatey 는 Windows SW용 시스템 수준의 명령줄 패키지 관리자 및 설치 프로그램. NuGet 패키징 인프라와 Windows PowerShell 을 사용해 SW 다운로드 및 설치 프로세스를 단순화한다 Chocolatey is a machine-level, command-line package manager and installer for Windows software. It uses the NuGet packaging infrastructure and Windows PowerShell to simplify the process of downloading and installing software. https://en.wikipedia.org/wiki/Chocolat..
-
managed template typescript 로 시작했다가 낭패프로그래밍/ReactNative 2022. 4. 24. 12:43
처음엔 아슬아슬하게 괜찮은 듯 했으나 뭐 설치하니까 오류 떠버렸다 tsconfig.json 파일에 expo/tsconfig.base 부분에 빨간 줄이 떠서 검색을 해보고 그냥 간단하게 rm -rf node_modules rm package-lock.json / rm yarn.lock 하고 yarn 으로 재설치하고 expo upgrade 해줬는데 오류가 더 떠버렸다 ㅋ ㅠ 참고한 블로그는 아래 https://velog.io/@hamster/TIL-expo-SDK-%EC%97%85%EB%8D%B0%EC%9D%B4%ED%8A%B8%EC%8B%9C-expo-upgrade%EC%99%80-tsconfig.base.json [TIL] expo SDK 업데이트시, expo upgrade와 tsconfig.base.j..