Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
자바스크립트 + 리액트 디자인 패턴
by
애디 오스마니(Addy Osmani)
,
윤창식
August 2024
Beginner to intermediate
384 pages
7h 38m
Korean
Hanbit Media, Inc.
Content preview from
자바스크립트 + 리액트 디자인 패턴
119
Chapter 07_
자바스크립트 디자인 패턴
// 출력:
// drive sideways
7.12.1
장점과 단점
믹스인은 함수의 중복을 줄이고 재사용성을 높입니다. 애플리케이션에서 객체 인스턴스 사
이에 공유되는 기능이 있다면 믹스인을 통해 기능을 공유하여 중복을 피하고 고유 기능을 구
현하는 데에 집중할 수 있습니다.
단, 믹스인의 단점은 아직 논쟁의 여지가 남아 있습니다. 몇몇의 개발자들은 클래스나 객체
의 프로토타입에 기능을 주입하는 것을 나쁜 방법이라고 여깁니다. 프로토타입 오염과 함수
의 출처에 대한 불확실성을 초래하기 때문입니다. 어쩌면 실제 대규모 시스템에서는 그럴지
도 모릅니다.
리액트에서도
ES6
클래스의 도입 이전
11
에는 컴포넌트에 기능을 추가하기 위해 믹스인을 사
용하곤 했습니다. 그러나 리액트 개발 팀은 컴포넌트의 유지보수와 재사용을 복잡하게 만든
다는 이유로 믹스인을 반대
12
했습니다. 그 대신 고차 컴포넌트나
Hooks
의 사용을 장려
13
했
습니다.
저는 문서화를 잘해두면 믹스인된 함수의 출처에 대한 혼란을 최소화할 수 있다고 생각합니
다. 모든 패턴이 그렇듯, 구현 과정에서 주의를 기울인다면 괜찮을 겁니다.
7.13
데코레이터 패턴
데코레이터
Decorator
패턴은 코드 재사용을 목표로 하는 구조 패턴입니다. 믹스인과 마찬가지
11
옮긴이_ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
AI를 위한 필수 수학
할라 넬슨
개발자를 위한 커리어 관리 핸드북
마이클 롭
클라우드 엔지니어를 위한 97가지 조언
Emily Freeman, Nathen Harvey, 정기훈(Jung Ki Hun)
만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
한민주, 양찬석, 탈 아터
Publisher Resources
ISBN: 9791169212571