react (4) 썸네일형 리스트형 [React] 에러해결 React Hook "" is called in function "" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use" 에러 발생 React Hook "" is called in function "" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use" 에러 해결 React 컴포넌트 이름은 대문자로 시작 ex) const user = () => {} const User = () => {} user -> User 대문자로 변경 [React] 카툰화 API(Ainize API) 이미지를 카툰화로 바꿔주는 오픈 API - 해당 URL로 이미지 및 비디오를 POST 요청 보내면 카툰화된 이미지 및 비디오로 반환 https://ainize.ai/psi1104/White-box-Cartoonization psi1104/White-box-Cartoonization Official tensorflow implementation for CVPR2020 paper “Learning to Cartoonize Using White-box Cartoon Representations” ainize.ai 사용사례 예제 코드 1. React, useState 및 axios import import React, {useState} from 'react'; import './App.css'; import .. [Spring Boot, React] 405 (Not Allowed) 에러 1. GET POST 요청 일치하는지 확인 Spring Boot에서 GET 요청만 받는데 POST는 보내지 않는지 POST만 요청만 받는데 GET 보내지 않는지 확인 2. 프론트 -> 백 매핑이 잘 되었는지 확인(URL 일치여부 확인) Spring Boot 서버포트 및 서버 어드레스 React 베이스 URL 일치여부 확인 [Spring Boot] Base64 이미지 관리 Spring Boot, MySQL, React 1. 컨트롤러 1-1 MultipartFile을 이용해서 이미지 받아오기 1-2 받은 이미지 Base64로 인코딩 후 String에 저장 1-3 데이터 베이스 저장을 위해 서비스로 전달 @PostMapping() public ResponseEntity save(MultipartFile image) throws IOException { String photoImg = null; if (image != null) { Base64.Encoder encoder = Base64.getEncoder(); byte[] photoEncode = encoder.encode(image.getBytes()); photoImg = new String(photoEncode, "UT.. 이전 1 다음