본문 바로가기

Joyful 디버깅

(13)
[css] rotate3d를 하면 z-index가 적용되지 않을 때, roatate3d와 z-index 충돌 에러 해결 현재 진행 중인 프로젝트에 rotate3d를 이용해 책을 입체적으로 회전시키는 기능을 추가했다. 개발하는 동안 크롬 개발자 도구에서 확인했을 때는 별다른 문제가 없었는데, 배포한 후 모바일 화면으로 회전 기능을 실행해보니 아래와 같은 문제가 발견되었다. 책이 rotate3d로 회전하면서 Header 영역을 뚫고 나오는 문제였다. 혹시나 하고 책이 회전하는 동안 사이드 메뉴도 눌러봤더니, 역시나 책이 SideDrawer 영역을 뚫고 나왔다. 해결방법 1 ( X ) 처음엔 z-index를 이용해 해결해보기로 하고, Header의 Navbar 컴포넌트와 SideDrawer 컴포넌트에 엄청나게 큰 z-index 값을, 회전하는 책 컴포넌트에는 z-index 값을 1로 적용시켜보았다. 그래도 책 컴포넌트가 Hea..
[React] react-router history.push 해도 url만 바뀌고, 새로고침은 안 되는 문제 해결하기 현재 개발중인 프로젝트에서 history.push 로 url을 이동했는데도 페이지가 refresh 되지 않는 오류를 겪었다. 현재 경로 '/product/과학/' 에서 왼쪽 메뉴의 다른 카테고리 버튼을 눌러 '/product/${이동할 카테고리}' 경로로 이동하는 방식이다. import { useHistory } from "react-router-dom"; const menuClickHandler = (category) => { history.push(`/product/${category}`); }; history.push로 이동하는 위 함수를 카테고리 메뉴 아이템의 onClickHandler로 지정해두었다. import React, { useEffect } from "react"; import { us..
[Git] 소스트리 fatal : Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 에러 해결 방법 평화롭게 코딩을 시작하던 어느 날 또다시 마주친 에러 화면... fatal : Could not read from remote repository Please make sure you have the correct access rights and the repository exists. 갑자기 저장소를 읽을 수 없다며 저장소가 존재하고 있는지 확인해달라고 한다 에러의 원인 불현듯 스쳐 지나가는 지난날의 나의 소스트리 에러 joyful-development.tistory.com/5 [Git] 소스트리 permission denied 에러(Invalid username or password 와 permission denied,fatal: unable to access,The reque 멀쩡하게 소스트리를 잘..
[React] React 리액트 Warning: Cannot update during an existing state transition (such as within render). Render methods should be a pure function of props and state. 에러 해결 const logOutButtonClickHandler = () => { localStorage.removeItem('jwt'); localStorage.removeItem('registerState'); location.reload(); }; react_devtools_backend.js:2273 Warning: Cannot update during an existing state transition (such as within render). Render methods should be a pure function of props and state. → 로그아웃 이후 로그인 화면으로 돌아왔을 때 위와 같은 오류가 발생했다. 처음엔 화면이 전부 렌더되지 않았을 때 사용자가 시작하기 버튼 클릭 시 위와같..

728x90
반응형