이번에 회사에서 디자인 시스템까지는 아니지만 다양한 공통 컴포넌트를 설계하였고, 해당 업무를 진행하면서 느낀점을 작성해보려합니다. 해당 컴포넌트 어떤 레벨인가?먼저 공통 컴포넌트로 구현할 컴포넌트가 어느정도 레벨의 컴포넌트인지 파악해야합니다.여기서 말하는 레벨이란 간단한게 3단계로 나눌 수 있을거같습니다 기본 레벨버튼, 입력 필드, 토글 등 일반적인 UI 요소중간 레벨모달, 카드, 네비게이션 바 등 여러 개의 기본 블록이 결합된 UI 컴포넌트애플리케이션 레벨사용자 프로필 카드, 쇼핑 카트, 데이터 테이블 등 특정 도메인과 밀접하게 연결된 컴포넌트 간단한 예시를 들어본다면 ``은 일반적으로 가장 저수준의 컴포넌트입니다.이 컴포넌트 다른 컴포넌트에서 일종의 레고처럼 하나의 블럭으로 사용될 수 있고, 단독으로..
[참고: tanstack query][참고: query.gg] The Official React Query Course - 🔮 query.ggMaster React Query with mystifying ease. Built in collaboration with the React Query core team.query.gg TanStack | High Quality Open-Source Software for Web DevelopersHeadless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.tanstack.com ..
[참고: Suspense] – React" data-og-description="The library for web and native user interfaces" data-og-host="react.dev" data-og-source-url="https://react.dev/reference/react/Suspense" data-og-url="https://react.dev/reference/react/Suspense" data-og-image="https://scrap.kakaocdn.net/dn/cIBo4A/hyW2PgrBzX/WAkmyEkDZsl3ztJjxf1Sx0/img.png?width=1080&height=567&face=0_0_1080_567,https://scrap.kakaocdn.ne..
[참고: Synchronizing with Effects] Synchronizing with Effects – ReactThe library for web and native user interfacesreact.devSome components need to synchronize with external systems. Effects let you run some code after rendering so that you can synchronize your component with some system outside of React. 리액트 공식문서를 살펴보다보면 흥미로운 카테고리가 존재합니다.Escape Hatches 라는 탈출구라는 카테고리입니다. 여기에 속해있는 내용들을 살펴보면, ref / ..
[참고: Referencing Values with Refs] Referencing Values with Refs – ReactThe library for web and native user interfacesreact.devWhen you want a component to “remember” some information, but you don’t want that information to trigger new renders, you can use a ref. React에서 `ref`에 대해서 학습할 때, 보통 직접적인 DOM 조작을 위해서 사용한다고 배웁니다.물론 맞는 말입니다. 하지만 React 팀에서는 그 용도보다 강조하는 용도가 존재합니다상태를 저장하고 싶지만, 해당 상태가 렌더링 흐름에 관..
[참고: react.dev - Props and state are immutable] Components and Hooks must be pure – ReactThe library for web and native user interfacesreact.dev위의 react 공식문서는 React에서 불변성이 중요한 이유와 왜 불변성을 유지해야하는지에 대해서 설명하고있습니다.이 문서에서는 처음부터 전달하고 싶은 내용을 요약해서 제공합니다A component’s props and state are immutable snapshots. Never mutate them directly 컴포넌트의 props와 state는 불변의 스냅샷이므로, 이를 직접 수정하지 말라고 합니다.이 문장을 끊어서 보겠습니다. 컴포넌트..