본문 바로가기

Design Pattern24

[TS Design Patterns] 생성 패턴 - 빌더 Builder - Lets you construct complex objects step by step - Allows us to produce different types and representations of an object using the same construction code - Suggests that us extract the object construction code out of its own class and move it to separate objects called builders - 예시 /** * The Builder interface specifies methods for creating the different parts of * the Product objects. .. 2023. 10. 21.
[TS Design Patterns] 생성 패턴 - 팩토리 메서드 Factory Method (Virtual Constructor) - Provides an interface of creating objects in a superclass, but allows subclasses to alter the type of objects that will be created - Suggests that we replace direct object construction calls (using the new operator) with calls to a special factory method - Creator, Sub Classes - Sovles the problem of creating product objects without specifying their concret.. 2023. 10. 21.
[TS Design Patterns] 생성 패턴 - 추상 팩토리 Abstract Factory - lets you produce families of related object without specifying their concrete classes - Product families and their variants - The first thing the Abstract Factory pattern suggests is to explicitly declare interfaces for each distinct product of the product family - Then We can make all variants of products follow those interfaces - The next move is to declare the Abstract Fact.. 2023. 10. 19.
[World Article #9] React Design Patterns: You Should Know in 2023 - by Saurabh Barot (작성중...) 1. The HOC (Higher Order Component) Pattern - memo (React 내장 HOC) - withRouter (React-Router) - connect (React-Redux) - withStyles (MUI) - Q. class형 말고 함수 컴포넌트로 작성 가능? - Q. Redux의 flux 패턴이란? - 예시) memo, withRouter 2. The Provider Pattern - React-Redux, Mobx 등 상태 관리 라이브러리의 기본 - React 내장 Context API 기반 - 핵심은 Avoid Props Drilling - Q. 그 사이 props 필요없는 컴포넌트도 리렌더링 같이 발생? - 예시) 어드민 3. Presenta.. 2023. 10. 18.
반응형