본문 바로가기

전체 글174

springBoot2 jpa Test Errors jpa 시작해보기 > 아주 기본만 익히고, 일단 실습. 필요한 것은 그때그때 찾아본다. ==> JPA 1회독 하고, 다시 이 글을 보니... 참... 맨땅에 삽질했구나싶다. 결국 기본부터 다시 보게 된다... 개발환경 java 1.8 springboot 2.1.9 gradle 4.10.2 1. 패키지명을 java.orm.jpa로 해서 Application.java를 실행하면, 다음 에러 발생 누가 패키지명을 java로 시작하나-_-' --------------------------- Java Virtual Machine Launcher --------------------------- Error: A JNI error has occurred, please check your installation and.. 2021. 4. 5.
replaceAll 방법1 var reg = new RegExp(searchText, 'g'); originalText = originalText.replace(reg, replaceText); 문제점: searchText에 역슬래시 "\" 또는 $ 등의 정규식에서 사용하는 특수기호가 들어가면 RegExp에서 에러발생 방법2 단순무식 while const replaceAll = (original: string, searchText: string, replaceText: string) => { let resultText = original; let index = - 1; let startIndex = 0; index = resultText.indexOf(searchText, startIndex); while (index > .. 2021. 3. 11.
react-redux index.js import 'core-js/stable'; import 'regenerator-runtime/runtime'; import 'react-app-polyfill/ie9'; import 'react-app-polyfill/stable'; import React from 'react'; import ReactDOM from 'react-dom'; import { createStore } from 'redux'; import { Provider } from 'react-redux'; import App from './App'; import * as serviceWorker from './serviceWorker'; import rootReducer from './modules'; const s.. 2021. 3. 3.
onClick 대신 onMouseDown button 등을 클릭시 스크롤의 변화 또는 다른 이벤트가 먼저 실행되어서 onClick이 아예 실행되지 않으면 onMouseDown을 적용해보자. 왜그럴까... 이벤트 버블링에 문제가 있는듯... blueshw.github.io/2018/04/23/event-bubbling-capturing/ 2021. 3. 3.
ie11에서 onMouseEnter가 중첩되었을때 event를 하위 컴포넌트까지 pass 하지 않음. import React from 'react'; const Btn = () => { return ( { console.log('Btn onMouseEnter'); }}>클릭 ) } export default function Component() { return ( { console.log('Component onMouseEnter'); }} > ) } 2021. 3. 3.
onMouseEnter 이슈 보통 onMouseEnter, onMouseLeave 를 쌍으로 사용한다. 그런데 간혹 onMouseLeave event가 발생되지 않는 케이스가 있다. leaver가 발생할 수 있는 dom 자체가 사라지면, leave가 발생하지 않는다. import React from 'react'; export default function Component() { const [highlight, setHighlight] = React.useState(false); const [visible, setVisible] = React.useState(true); return ( { setHighlight(true); }} onMouseLeave={() =>{ setHighlight(false); }} > Event1 hi.. 2021. 3. 3.
Context 예제 Test.tsx import React, {useContext} from 'react'; import ColorContext, {ColorProvider} from '../contexts/color'; const Update1 = () => { const { state, actions } = useContext(ColorContext); console.log('state', state); return ( state: {state.color} { actions.changeColor('hahah'); actions.increase(123); }}>클릭 ) } const Select1 = () => { const { state, actions } = useContext(ColorContext); console.. 2021. 3. 3.
aws amplify 기능 정리 참고: 튜토리얼 따라하기 https://docs.amplify.aws/start/getting-started/installation/q/integration/js Tutorial - Prerequisites - Amplify Docs Getting Started with Amplify Framework - Prerequisites docs.amplify.aws npm install -g @aws-amplify/cli # 기본 설치 amplify configure # amplify 기본 구성 설정 # 지역 설정 # 사용자 생성(aws 1개 계정에, 여러 사용자를 추가할 수 있다.) # 사용자 생성시 받은 accessKeyId와 secretAccessKey로 사용자 인증을 한다. (secretAccessKe.. 2020. 7. 3.