DevLog/Error
-
에러 내용 Warning: React does not recognize the 'showMessage' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase showmessage instead. If you accidentally passed it from a parent component, remove it from the DOM element 에러 코드 const InputMessage = styled.p` font-size: 0.75rem; color: red; display: ${(props) => (props.showMessage ? "bl..
[React] React does not recognize the "propname" prop on a DOM element.에러 내용 Warning: React does not recognize the 'showMessage' prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase showmessage instead. If you accidentally passed it from a parent component, remove it from the DOM element 에러 코드 const InputMessage = styled.p` font-size: 0.75rem; color: red; display: ${(props) => (props.showMessage ? "bl..
2023.10.19 -
에러 내용 Line 1:16: 'TodoList' is not defined 에러 코드 // App.js import TodoList from "./components/TodoList"; ... // TodoList.js export default TodoList = ({ item, id }) => { return ( {item.content} 편집 X ); }; 분명히 경로가 맞는데도 계속 위 에러 내용이 떴는데 원인은 export default 문법에 있었다. 화살표 함수가 편해서 내 마음대로 위 방식으로 써도 되겠거니 하고 썼는데, function을 사용해야 했던 것이다. 해결 방법 export default function TodoList({ item, id }) { return ( {item.c..
[React] export default 문법 실수에러 내용 Line 1:16: 'TodoList' is not defined 에러 코드 // App.js import TodoList from "./components/TodoList"; ... // TodoList.js export default TodoList = ({ item, id }) => { return ( {item.content} 편집 X ); }; 분명히 경로가 맞는데도 계속 위 에러 내용이 떴는데 원인은 export default 문법에 있었다. 화살표 함수가 편해서 내 마음대로 위 방식으로 써도 되겠거니 하고 썼는데, function을 사용해야 했던 것이다. 해결 방법 export default function TodoList({ item, id }) { return ( {item.c..
2023.09.23 -
오류 발생 코드 collisionCheck() { chunkedMap1.tiles.forEach((arr) => { if ( this.position.x arr.x && this.position.y + tileSize > arr.y && this.position.y velocity) this.position.x = arr.x - tileSize - 0.01; if (this.vy < -velocity) this...
[JavaScript] Uncaught SyntaxError: Illegal break statement오류 발생 코드 collisionCheck() { chunkedMap1.tiles.forEach((arr) => { if ( this.position.x arr.x && this.position.y + tileSize > arr.y && this.position.y velocity) this.position.x = arr.x - tileSize - 0.01; if (this.vy < -velocity) this...
2023.08.11 -
에러명: Uncaught ReferenceError: x is not defined // in Player.js class Player extends Sprite // in Sprite.js class Sprite 상단의 유튜브 강의를 보면서 sprtite 파트를 공부하고 있었는데, 이상하게도 계속 위의 에러가 발생했다. 오타도 없었고 강의와 그대로 코드를 작성했는데도 에러가 해결되지 않아서 혹시나 하고 HTML 파일을 탐색했다. 이것때문이었다! Player 클래스는 Sprite를 상속하므로 Sprite.js 파일이 Player.js 파일보다 앞에 위치해야 했다. 이처럼 스크립트 파일이 여러 개일 때, 특히 클래스나 함수를 공유하는 경우에는 스크립트 순서를 잘 배치해야 한다. 위처럼 Player.js, ..
[JavaScript] Uncaught ReferenceError - script 여러 개 정렬시 순서 주의에러명: Uncaught ReferenceError: x is not defined // in Player.js class Player extends Sprite // in Sprite.js class Sprite 상단의 유튜브 강의를 보면서 sprtite 파트를 공부하고 있었는데, 이상하게도 계속 위의 에러가 발생했다. 오타도 없었고 강의와 그대로 코드를 작성했는데도 에러가 해결되지 않아서 혹시나 하고 HTML 파일을 탐색했다. 이것때문이었다! Player 클래스는 Sprite를 상속하므로 Sprite.js 파일이 Player.js 파일보다 앞에 위치해야 했다. 이처럼 스크립트 파일이 여러 개일 때, 특히 클래스나 함수를 공유하는 경우에는 스크립트 순서를 잘 배치해야 한다. 위처럼 Player.js, ..
2023.08.08