일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- electron
- react-admin
- API Gateway
- signIn
- electron-builder
- JavaScript
- jimp
- react-hook-form
- react-sortable-hoc
- gitignore
- node
- yml
- icrawler
- Route53
- TypeScript
- zerocho
- AWS
- react-xml-parser
- 가상 DOM
- window.postMessage
- 프로그래머스
- domtoimage
- dynamodb
- axios
- timeinput
- react
- react DOM
- cognito
- xlsx
- readableStream
- Today
- Total
목록전체 글 (43)
꾸준히 공부하는 개발자
react state에서 삭제를 할 일이 생겼다. 하지만 처음에만 리스트가 삭제되어 렌더링되고 그 다음부터는 값이 삭제만되고 렌더링이 되지 않았다. 간단하게 예를 들면, const [a,setA] = useState([1,2,3,4]) a.splice(0,1) setA(a) 이런식으로 구현하는 어리석은 짓을 해버렸다.. array 에 추가 삭제할 때는 왠만해서는 mutate 를 하지말라고 한다. 그래서 이런식으로 수정을 하였다. const [a,setA] = useState([1,2,3,4]) const num = 배열의 제거할 원소 index setA(a.filter((value,index) => index === num )) rendering 의 문제인줄만 알았던 나는 빙빙돌아 결국 기초적인 부분에서..
#include using namespace std; int solution(int n) { int answer = 0; while(n > 0){ answer = answer + n%10; n= n/10; } return answer; }
자식창에서 로그인하여 부모창으로 query를 날려야 할 일이 발생하였다. window.opener 와 window.postMessage를 이용하여 event를 발생하여 해결하였다. 자식창에서 부모창으로 event를 날리는 코드 window.opener.postMessage({code:locationQuery.code}, '*') 부모창에서 자식창의 event를 받는 코드 (선언한 함수가 window.addEventListner보다 위에 있어야 한다.) const receiveMessage = async (e) => { if(e.data.hasOwnProperty('code')){ console.log(e) } } window.addEventListener("message", receiveMessage, ..

react-admin Document에 보면 DateInput 이나 DateTimeInput은 존재하는데 TimeInput은 없다. 문서에는 timepicker 를 이용하라고 나와있는데 Timepicker 를 이용하여 구현하였다. Timeinput.js import React from 'react'; import PropTypes from 'prop-types'; import {withStyles} from '@material-ui/core/styles'; import {TextInput} from "ra-ui-materialui" const styles = theme => ({ container: { display: 'flex', flexWrap: 'wrap', }, textField: { width:..
#include #include #include using namespace std; string solution(vector participant, vector completion) { map m; for(int i = 0 ; isecond == 1..

Interface interface PartialPointX { x: number; } interface Point extends PartialPointX { y: number; } //상속 Type type PartialPointX = { x: number; }; type Point = PartialPointX & { y: number; }; //상속 섞어서 상속도 가능하다. type PartialPointX = { x: number; }; interface Point extends PartialPointX { y: number; } interface PartialPointX { x: number; } type Point = PartialPointX & { y: number; }; Implements ..

react-admin 의 fileInput을 커스텀하여 react-sortable-hoc 를 적용하였다. react-admin ver 2.8 if (data.length > 0) { formData.images = data } react-admin ver 3.1 react-final-form 을 이용하여 구현하였다. if (data.length > 0) { form.batch(() => { form.change('mainImages', data) }) } used react-dropzone ver 4.0.1 grid-example 도 만들어놓았다. 코드를 보고싶다면 아래 링크에 들어가서 확인하면 된다. https://github.com/pjw9195/react-admin-OrderImageInput pj..
string, number, array ,object 선언 방식 //기본 타입들 let num : number; num = 3; let str : string = 'hello'; let arr: (string | 3 | boolean)[] = [true, 3 ,'hello']; const obj: {a:string, b?:number} = {a:'b'}; enum 사용 //enum의 활용 enum Color {red,green,blue} let c: Color =Color.green; Color[0] === 'Red'; Color['red'] === 0; enum 같은 경우에는 select input 같은 경우에 숫자로 떨어질 때 치환하여 사용하면 아주좋을 것 같다고 생각하였다. 또 잘만쓰면 코드를 깔끔..