반응형 spring32 [ React ] Uncaught TypeError: users.map is not a function 오류 해결 방법 💥 Chrome 개발자 도구에서 발생한 에러 메시지Uncaught TypeError: users.map is not a function ❓에러 발생 이유JavaScript의 map 메서드는 Array 타입의 변수를 대상으로 실행되는 함수입니다.하지만 Array 타입이 아닌 자료형의 변수를 대상으로 해당 메서드를 사용할 경우에 나타나는 오류 메시지입니다. 👉 React의 렌더링 흐름아래 코드에서 console.log를 통하여 users를 출력해 보겠습니다.import React, { useEffect, useState } from "react";function UserPage() { const [users, setUsers] = useState(""); useEffect(() => { fetc.. 2024. 10. 14. [React] JSX란? 아주 쉽게 총 정리(+코드, 그림) 📄 JSX란?JavaScript에 HTML 태그를 끼얹은 문법JSX = JavaScript + HTMLHTML 태그 안에선 중괄호({})를 사용해서 JS를 쓸 수 있다.JavaScript의 공식 문법이 아니며, JavaScript의 확장 문법이다. 🖥️ 소스 코드로 이해하기const count = 1;const title = {count}번째 게시물다음 코드는 title 이라는 변수에 {count}번째 게시물을 선언한 코드입니다.즉, JavaScript 문법(const title)에 HTML 태그()를 끼얹은 JavaScript의 확장 문법입니다. 📄 JSX의 특징JSX에서 사용되는 태그의 속성 이름이 HTML과 조금 다름class -> classNamefor -> htmlForonclick ->.. 2024. 10. 8. [QueryDSL] Could not find com.querydsl:querydsl-apt: 5.0.0. 오류 해결 방법 🚨 Build 실행 후 발생한 에러 메시지itemservice-db:main: Could not find com.querydsl:querydsl-apt: 5.0.0.Required by: project :Possible solution:- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html ❓에러 발생 이유Spring이 해당 라이브러리를 찾지 못해서 발생하는 에러 메시지입니다.저의 경우에는 com.querydsl:querydsl-apt: 5.0.0에서공백이 발생하여 해당 라이브러리를 찾지 못해 나타난 에러.. 2024. 7. 22. [Spring] 405 Method Not Allowed 오류 해결 방법 (with Postman) 🚨 Postman send 버튼 클릭시 발생한 에러 메시지{ "timestamp": "2024-07-11T17:14:17.577+00:00", "status": 405, "error": "Method Not Allowed", "path": "/test"}❓에러 발생 이유클라이언트에서 요청한 HTTP Method가 서버에 존재하지 않아 나타나는 오류 메시지입니다.해당 오류 메시지는 Spring(Servlet, Tomcat)이 출력하는 에러 메시지입니다.예를 들어 서버(Spring, Java)에서는 HTTP Method를 Put으로 요청받기를 설정하였지만, 클라이언트에서는 HTTP Method를 Post로 요청할 경우에 나타나는 에러입니다.보통은 HTTP Method 설정을 잘못 설정.. 2024. 7. 12. 이전 1 2 3 4 5 6 7 8 다음 반응형