Language
-
React/memory leak - componentWillUnmount Event 제거 이슈Language/React 2022. 10. 19. 11:08
class Component에서 resize event를 사용하였는데 componentWillUnmount에서 제거해 주어도 메모리 누수가 발생하여 분석 및 처리 내용이다. Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. 원인 분석 addEventListener/removeEventListener에 동일한 매개변수와 함수를 전달하여야 하는데 t..
-
React/createContext, useContext 사용하기Language/React 2022. 10. 12. 16:56
Class Component -> createContext const MyContext = React.createContext(); class MyComponent extends Component { const [user, setUser] = useState(null); render() { const propsMy = { ... isMobile: () => { return this.isMobile }, ... }; return ( ... ... ); } }; export default MyComponent; Class Component -> useContext class UserComponent extends Component { static contextType = MyContext; state = {..
-
React/AntV G2plot Chart 적용Language/React 2022. 10. 12. 11:50
Module 추가 $ yarn add @antv/g2plot https://yarnpkg.com/package/@antv/g2plot https://yarnpkg.com/package/@antv/g2plot Fast, reliable, and secure dependency management. yarnpkg.com JSX Source Component base라서 ComponentDidMount 함수에서 적용 import { Pie } from '@antv/g2plot'; class UnitsDashboard extends Component { state = {} setPie = () => { const data = [ { type: '라벨1', value: 27 }, { type: '라벨2', val..
-
React/Swiper 적용Language/React 2022. 10. 12. 11:19
module 추가 $ yarn add swiper JSX Code // Import Swiper React components import { Swiper, SwiperSlide } from 'swiper/react'; import SwiperCore, { Navigation, Pagination } from "swiper"; // Styles must use direct files imports import 'swiper/swiper.scss'; // core Swiper import 'swiper/modules/navigation/navigation.scss'; // Navigation module import 'swiper/modules/pagination/pagination.scss'; // Pa..
-
Twig tag 모음Language/EL tag 2022. 9. 2. 13:36
그냥 보면 달 알듯하여 작업된 코드만 추가 {% include "import/common/header.html" with {'is_unified_search': true, 'is_header_cart': true} %} {% set ezp_navi_title = template_layout.sPageTitle %} {% if template_layout.aNavList is iterable and template_layout.aNavList|length > 3 and is_full_navigation != true %} {% if template_layout.aNavList[2].pageTitle is not empty %} {% set ezp_navi_title = template_layout.aNav..
-
Python/DockerLanguage/Python 2022. 9. 2. 13:29
1차에서는 간단히 도커관련된 부분만 정리 docker config docker/flask/config/requirements.txt Flask==1.0.2 Flask-Cors==3.0.7 pandas==0.23.4 matplotlib==3.0.2 bezier==0.9.0 boto3==1.9.57 flask-restplus==0.12.1 Flask-SQLAlchemy==2.3.2 PyMySQL==0.9.2 Flask-Login==0.4.1 Flask-Security==3.0.0 pytz==2018.7 Pillow==5.3.0 Flask-SocketIO==3.1.0 gevent==1.3.7 gevent-websocket==0.10.1 openpyxl==2.5.12 requests==2.21.0 lxml==4..
-
NodeJS/채팅 만들기 (BackEnd)Language/NodeJS 2022. 9. 2. 10:41
frontend는 별도 backend는 node js로 구성된 서비스 실질적인 작업은 일주일도 하지 못하고 완성된 작품이라서 부족한게 많지만 다음에는 좀더 좋게 만들기 위해서 간단히 기록해 둔다. 다음에는 타입스크립트 및 세션베이스로 고려해보자. package.json { "name": "test-nodejs", "version": "1.0.0", "description": "test nodejs", "main": "index.js", "author": "kand.deokjoon", "license": "ISC", "type": "module", "scripts": { "build": "babel . --ignore node_modules,build --out-dir build", "start:local..
-
Spring Boot/어플리케이션 실행할때 JPA 스키마 생성 및 ddl, dml sql 실행Language/Java 2022. 8. 18. 21:37
https://github.com/dchkang83/project-board GitHub - dchkang83/project-board Contribute to dchkang83/project-board development by creating an account on GitHub. github.com jpa의 ddl-auto: create 옵션 설정으로 entity구성을 생성하고 추가적인 ddl 및 dml 스크립트를 만들어 놓고 소스 수정이 발생해도 주요 데이터는 이미 넣어져 있는 형태로 구성할때 유요할 듯 하다. (저도 매번 귀찮아서.. 그냥 한번 설정해 주고 쓴다.) JPA ddl-auto 설정 스프링부트 기동시에 선언되어 있는 entity속성에 맞게 테이블 생성/수정 spring: dataso..