분류 전체보기
-
[은버지 Study] React-query에 대하여프로그래밍/React 2023. 7. 31. 01:34
react-query를 사용해야 하는 이유는 뭘까? 없다면 어떻게 비동기 state를 관리를 할까? useEffect로 비동기처리를 할려 생각하고 API를 가져와서 useState로 선언한 곳에 넣어주고 오류를 처리하는 작업도 따로 해주어야하는 번거롭고 boiler plate가 많이 일어나는 일을 거쳐야 한다. 이렇게 복잡한 것 말고 데이터 가져오고 관리하고 캐싱하고 하는 React-query한번 써보자 1. 기본 설정, Devtools, Options React Query의 설치 및 초기 설정 v3 npm install react-query yarn add react-query v4 (latest) $ npm i @tanstack/react-query $ pnpm add @tanstack/react-q..
-
[React] useRef 의 개념프로그래밍/React 2023. 7. 25. 02:31
useRef를 올바르게 쓰는 방법은 무엇일까? 먼저 useRef가 어떻게 작동하는지부터 알아보자 useRef란 current 객체를 반환하는 Hooks으로써 이렇게 한번 만들어진 current 객체는 랜더링이 발생해도 바뀌지 않고 고유한 값을 유지한다. 무수한 리랜더링 사이에서도 값을 유지해야하는경우 ex) infinite scroll의 식별객체 랜더링에 영향을 받지고 끼치지도 않는 특이한 녀석 ref의 변경은 감지되지도 않고 useEffect의 deps로도 사용할 수 없다 useRef의 초기값으로 null을 넣오도 되는 이유는? 이자식은 뭐하길래 null을 대부분의 초깃값으로 넣는 걸까? 객체가 선언되고 컴포넌트가 실행되고 평가가 진행되는 시점에서의 current객체는 null로 평가가 되기때문에 초기..
-
[항해99 회고록] 미니프로젝트개발일지/항해 99 2023. 7. 21. 00:10
느낀 점 많이 부족함도 느끼고 다시한번 복습도 많이하는 기회가 되는 한주차였다. 매칭 된 팀원이랑 실력이 그렇게 차이가 나지않아서그런지 둘이서 으쌰으쌰해서 잘 해낼 수 있었지만 백엔드 팀원들과의 의사소통을 많이 하지못한것이 조금 아쉬움으로 남는다. 프로젝트도 열심히 했지만 조금 만족하지 못하는 상태로 마무리를 하게 되어서 아쉬움이 많이 남는다. 하지만 분명 좋은 시간이였고 더 나은 개발자가 될 수있겠다는 생각도 들었다. 아쉬운 점 ● 기술스택에 대한 아쉬움 1. S3와 로그인 JWT를 구현을 해보지 못한 것에 아쉬움이 있어서 오늘은 꼭 마무리를 해보고 자려고 한다. 2. 다른 조의 발표를 들으면서 전혀 처음보는 라이브러리 및 기술을 발견했기에 조금 조사해보려한다. (젠킨스, 리액트네임규칙, 인라인스타일이..