Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Nuxt.jsが掲げる"Universal Vue.js Applications"とは何者か
Search
Yosuke Ishikawa
October 04, 2017
Programming
2.9k
10
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nuxt.jsが掲げる"Universal Vue.js Applications"とは何者か
Yosuke Ishikawa
October 04, 2017
More Decks by Yosuke Ishikawa
See All by Yosuke Ishikawa
効率的な開発手段として VRTを活用する
ishkawa
1
260
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
4.7k
Achieving Testability in Presentation Layer
ishkawa
4
4k
Introducing Wire: Dependency Injection by Code Generator
ishkawa
12
1.5k
Declarative UICollectionView
ishkawa
28
8.7k
Static Dependency Injection by Code Generation
ishkawa
15
6.9k
実践クライアントサイドSwift
ishkawa
23
4.5k
JSON-RPC on APIKit
ishkawa
5
71k
RxSwiftは開発をどう変えたか?
ishkawa
12
4.3k
Other Decks in Programming
See All in Programming
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
160
Are APIs Still Relevant in the AI Era?
soyuka
0
450
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
3
4.2k
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
Java 27新機能 / Java 27 new features
kishida
2
220
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
180
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
650
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
760
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.7k
JRuby: Past, Present, and Future
headius
0
230
contenteditable と日本語入力に向き合う
colorful12
0
190
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
700
Featured
See All Featured
Scaling GitHub
holman
464
140k
First, design no harm
axbom
PRO
2
1.3k
Balancing Empowerment & Direction
lara
6
1.3k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
210
A Modern Web Designer's Workflow
chriscoyier
699
190k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
How to Talk to Developers About Accessibility
jct
2
570
Designing for Performance
lara
612
70k
Designing Experiences People Love
moore
143
24k
Transcript
Nuxt.js が掲げる "Universal Vue.js Applications" とは何者か
None
None
None
Universal Mode SPA Mode
Universal Mode ← こっち SPA Mode
None
None
わかるようでわからない
でも、使ってみたら理解できた
None
None
None
デベロッパーは1 つの Nuxt.js アプリ( ≒ Vue.js アプリ) を 開発するが...
SSR するサーバーも生成される
"Universal Vue.js Applications"
そういう感じか~
Vue.js のアプリと 生成されるサーバーの関係は?
例 ディレクトリ構造 → ルーティングに反映 asyncData() → サーバーサイドで実行
ルーティング
pages ├── index.vue └── items ├── _id.vue ├── create │
└── index.vue └── index.vue Nuxt.js アプリのディレクトリ構造
export function createRouter () { return new Router({ mode: 'history',
base: '/', (中略) routes: [ {path: "/", component: _d26d9516, name: " {path: "/items", component: _8ac95cea, nam {path: "/items/create", component: _4bfc3 {path: "/items/:id", component: _07563ab3 ] }) } 生成されたサーバーのルーティング
asyncData()
asyncData() 最初に取得するデータをSSR
... <script> export default { async asyncData ({ app })
{ const res = await app.axios.$get('/api/item return { items: res.items, nextCursor: res.nextCursor, } } } </script> Nuxt.js アプリの.vue ファイル
let asyncDatas = await Promise.all(Components.m let promises = [] if
(Component.options.asyncData && typeof Com let promise = promisify(Component.options.a (中略) promises.push(promise) } (中略) return Promise.all(promises) })) context.nuxt.data = asyncDatas.map(r => r[0] || で実行してdata にセット
要するに
Vue.js アプリを書いてたら SSR するサーバーが生成される
None
サーバーはNode.js
サーバーの動作はカスタマイズ可能 外れすぎない範囲で使うのが良さそう