error 6

[Error]React - DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

React를 프로젝트를 진행하며 페이지 이동시 아래 에러 발생 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. 에러 발생 소스 ex) {data &&()} 에러 발생 원인 조건부 랜더링시 react에서 ins태그를 node로 인식하지 못함 해결 방법 react에서 node로 인식 할 수 있는 태그로 감싸줌 ex) {data &&()}

Error 2024.01.18

[React] APP 오픈 API CORS에러 NAVER geocode API

React에서 오픈 API 사용시 CORS에러 이유 ex) 클라이어트에서 외부 API서버로 바로 요청을 보내서 해결 방법 client to server 찌르는게 아니라 server to server로 Middleware를 통해서 찌른다. 예시 코드 Naver API geocode 사용 Next 서버르 통해서 통신 https://api.ncloud-docs.com/docs/ai-naver-mapsgeocoding-geocode geocode api.ncloud-docs.com next로 통실한 함수 생성 import axios from 'axios'; import { NextApiRequest, NextApiResponse } from 'next'; const NEXT_PUBLIC_NAVER_MAP_API..

React 2023.04.08