프로그래밍
-
[git] 팀 프로젝트를 하기 위한 git 사용 전략프로그래밍 2024. 4. 18. 22:04
개요 - Branch 전략을 정하자 (Git Flow vs Github Flow) - Github를 이용한 칸반보드 - 코드리뷰 방법 - 문서 관리 with Wiki 팀 프로젝트를 진행하면서 Github를 단순히 Repo만 공유하는 느낌으로 사용한단 느낌을 받았다. 프로젝트의 Tab만 봐도 Issues를 비롯해 여러가지 기능이 많고 우측의 Nav만 봐도 여러가지 할 수 있을 것 같다는 생각이 들었기에 어떻게 활용을 잘 할 수 있을까를 고민하다 한번 정리를 해보았다. ✅ Branch 전략 Github를 올바르게 사용하기에 앞서 Branch 전략를 어떻게 가져갈지에 대해서 정해야 한다. 이름에서 알 수 있듯이 branch의 네이밍은 어떻게 하고 각각의 branch를 어떤식으로 사용하고 merge를 어떻게 할..
-
[React] useLayoutEffect의 활용프로그래밍/React 2024. 4. 2. 20:58
개요 1. useLayoutEffect 2. Usage 3. useLayoutEffect의 성능저하 4. SSR에서 사용이 가능한가? ✅ useLayoutEffect란? 📦 useLayoutEffect(Setup, dependencies?) 브라우저가 화면을 다시 채우기 전에 실행되는 useEffect이며, 성능 저하를 유발할 수 있어 가급적 useEffect를 사용할 것을 공식문서에서는 권장하고 있다. 컴포넌트가 DOM에 추가되기 전에 React는 setup함수를 실행한다. 리랜더링 시: (클린업함수가 정의되어있을 시)cleanup 함수(이전 값ㅋ) → setup함수(새 값) → ( 컴포넌트가DOM에서 제거되기 전) cleanup 함수 실행 의존성을 이전 값과 비교하여 실행할지 말지를 결정하며, 인수가..
-
[Zustand] Zustand란?프로그래밍 2024. 3. 23. 13:52
개요 1. Zustand의 특징 2. 다른 라이브러리와 비교 3. 사용 방법 ✅ Zustand 우리는 Client state를 관리하기 위해서 상태 관리 라이브러리를 사용해야하는데 현재 update가 활발하게 이루어지고 있으며 사용량도 꾸준히 증가하고 있는 Zustand에 대해서 알아보겠습니다. (Jotai를 개발한 회사에서 만들었다고 한다.) 📦 Zustand의 개발 이유 React에서 일어나는 3가지 문제점에 대한 해결책을 제시하기 위해 제작되었다고 한다. Zombie children: 하위 컴포넌트인 "A"에서 실행하던 어떠한 일이 끝나기 전 상위 컴포넌트가 unmount되었을 시에 A가 작업을 끝낸 후 화면세엇 사라져도 메모리를 지속적으로 잡아먹는 문제 React concurrnecy: 우선순위를..
-
[React] 18버전의 추가된 새로운 기능 (step- 1)프로그래밍/React 2024. 2. 17. 19:59
📋 개요 useId startTransition, useTransition useDefferedValue useInesrtoinEffect ✅ useId 최상위 수준에서 호출되어 고유 ID를 생성하는 React Hook으로, 접근성 속성에 전달될 수 있다. key 는 데이터 식별을 위해 사용되므로 데이터에서 생성되는 것이 더 바람직하며, 너무 많은 호출이 일어나기 때문이다. 📦 사용하는 이유) 하드코딩의 횟수를 줄이자 컴포넌트를 여러번 사용하더라도 id 속성이 겹치지 않는다. 더보기 예시) 사용자의 이름 정보를 받기 위해 input을 컴포넌트로 받아서 id값을 name이라고 하였다. 이때 이 컴포넌트를 반복해서 사용하게 된다면 id가 name인 input이 여러 개 생기게 되는데 이는 좋은 상황이 아니다..