Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
おさらいVue Composition API
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
texdeath
November 21, 2019
Programming
0
480
おさらいVue Composition API
Vue3.xのRFCに導入されるVue Composition APIの紹介です。
texdeath
November 21, 2019
Tweet
Share
More Decks by texdeath
See All by texdeath
コードメトリクス計測による課題可視化と品質確保 / Visualize issues and ensure quality by measuring code metrics
texdeath
0
360
クライアントワークと管理画面の話
texdeath
0
270
次世代ヘッドレス開発室が提供するヘッドレスEC
texdeath
0
670
中期プロジェクトで e2eテストを導入してみて感じたこと
texdeath
2
7.9k
React使いがVueと仲良くなるためにやったこと
texdeath
0
300
Optional Chainingについて
texdeath
3
200
副業として個人事業主をやる場合の メリット・デメリット
texdeath
0
120
Container Componentは必要なのか
texdeath
4
670
Kotlin/JSでReactアプリを作ってみた
texdeath
1
940
Other Decks in Programming
See All in Programming
CSC307 Lecture 07
javiergs
PRO
1
560
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
890
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
2k
2025年の活動の振り返り
hideg
0
110
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
430
並行開発のためのコードレビュー
miyukiw
2
2k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
140
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
520
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
280
AI活用のコスパを最大化する方法
ochtum
0
110
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
300
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
110
Between Models and Reality
mayunak
1
210
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
100
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
470
KATA
mclloyd
PRO
35
15k
Transcript
͓͞Β͍ 7VF$PNQPTJUJPO"1* 1
๏ ాɹউॣ ๏ ϑϩϯτΤϯυΤϯδχΞ ๏ 3FBDU/PEF7VF /VYU ๏ 7VFྺϲ݄ͪΐ͍͘Β͍
๏ 5XJUUFS!UFYEFBUI 2
Agenda 1. What is Vue Composition API? 2. Better Type
Interface 3. Logic Extraction and Reuse 4. More Flexibility Requires More Discipline 5. まとめ 3
What is Vue Composition API Vue 3.xからRFCで組み込まれる関数ベースのAPI ロジックの再利用性を高め、より柔軟な構築を可能にする 4
جຊతͳྫ 5
جຊతͳྫ 6 ͜ͷؔ෦ͰσʔλؔͷఆٛΛߦ͏
جຊతͳྫ 7 ঢ়ଶͷએݴ ͜ͷؔ෦ͰσʔλؔͷఆٛΛߦ͏
جຊతͳྫ 8 ঢ়ଶͷએݴ ͜ͷؔ෦ͰσʔλؔͷఆٛΛߦ͏ ܭࢉͨ͠ঢ়ଶʢࢀরʣΛฦ͢
Better Type Interface TypeScriptへのサポートが大幅に向上 CreateComponentを定義すると型推論が効くようになる 9 import { createComponent }
from '@vue/composition-api'; const Component = createComponent({ // ͜ͷ෦Ͱܕਪ͕ޮ͘Α͏ʹͳΔ }); const Component = { // ͪ͜ΒͷίϯϙʔωϯτมͰܕਪ͕ޮ͔ͳ͍ // ʢTypeScript͕VueͷίϯϙʔωϯτͰ͋ΔͱஅͰ͖ͳ͍ͨΊʣ };
Logic Extraction and Reuse 関数化することで、任意の機能再利用が容易に 10
More Flexibility Requires More Discipline • 柔軟性を高めるためには、多くの規律が必要 • 適切に運用しないと品質は大きく下がってしまう •
VuexやRouterを組み合わせるとより難易度が上がる • JavaScriptのコアメカニズムに則った編成を心がける 11
ެࣜͷνϡʔτϦΞϧಈը͕Θ͔Γ͍͢ 12 https://www.vuemastery.com/courses/vue-3-essentials/why-the-composition-api/
·ͱΊ •Vue Composition APIを使えば •関数化が楽になる •TypeScriptでの型推論がしやすくなる •柔軟な構築が可能だが、それゆえより高度 な設計が必要 13