Skip to Content
실전 코드로 배우는 Vue.js
book

실전 코드로 배우는 Vue.js

by 마야 셰빈, 정병열
October 2024
Beginner to intermediate
452 pages
9h 28m
Korean
Hanbit Media, Inc.
Content preview from 실전 코드로 배우는 Vue.js
199
CHAPTER 05
컴포지션 API
컴포지션
API
05
CHAPTER
이전 장들에서 기존의 옵션
API
Vue
컴포넌트를 구성하는 방법을 자세히 배웠다. 옵션
API
Vue
2
가 등장한 이래
Vue
컴포넌트를 구성하는 가장 보편적인 도구였다. 그러나 한
편으로 옵션
API
는 컴포넌트 코드 규모가 커질수록 필요 이상으로 복잡해지고, 로직 가독성
과 재사용성을 저해하는 요인이 되기도 한다. 이번 장에서는 옵션
API
의 대안으로
Vue
가 새
로이 제시한 컴포지션
API
Composition
API
를 소개한다.
이번 장에서 배우는 다양한 컴포지션 훅으로
Vue
의 기능성
functional
, 상태형
stateful
엘리먼트를
생성할 수 있다. 또한 옵션
API
와 컴포지션
API
를 조합함으로써 반응성 제어 수준을 높이고,
애플리케이션에 필요한 재사용 컴포저블
composable
을 구성하는 방법도 배울 것이다.
5.15.1
컴포지션 컴포지션
APIAPI
를 통한 컴포넌트 설정를 통한 컴포넌트 설정
Vue
컴포넌트를 구성할 때는 통상적으로 옵션
API
를 사용한다. 그러나 데이터와 메서드가
중복될 염려 없이 컴포넌트 로직 일부를 재사용한다면 옵션
API
만으로는 역부족이다. 컴포
지션
API
는 믹스인
1
을 접목할 수 있어 이러한 요건에 부합하며 가독성과 체계성도 더 좋다.
1
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

실전 자바 소프트웨어 개발: 4가지 프로젝트로 배우는 최신 자바 개발 기법

실전 자바 소프트웨어 개발: 4가지 프로젝트로 배우는 최신 자바 개발 기법

우정은, 라울-게이브리얼 우르마, 리처드 워버턴
자바스크립트 + 리액트 디자인 패턴

자바스크립트 + 리액트 디자인 패턴

애디 오스마니(Addy Osmani)
실무로 통하는 타입스크립트

실무로 통하는 타입스크립트

슈테판 바움가르트너

Publisher Resources

ISBN: 9791169212991