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
one case of how to begin vuejs
Search
wtnabe
December 16, 2017
Programming
2
410
one case of how to begin vuejs
Kanazawa.rb meetup #64 で紹介した Vue.js の始め方
wtnabe
December 16, 2017
Tweet
Share
More Decks by wtnabe
See All by wtnabe
Ruby de Wasm
wtnabe
0
17
Cloud Native Buildpacksって結局どうなの?
wtnabe
0
14
Decoupled System with Turbo Frame
wtnabe
1
63
join-kanazawarb-or-7years-passed-since-it-was-borned
wtnabe
0
720
let-me-edit-with-editor
wtnabe
0
280
google-photos-and-storage-and-rclone
wtnabe
0
380
Kanazawa.rb meetup #56 Coderetreat Intro
wtnabe
0
400
lightweight authenticity of microservices
wtnabe
0
420
Automate WordPress deployment with WordMove
wtnabe
1
450
Other Decks in Programming
See All in Programming
RubyLSPのマルチバイト文字対応
notfounds
0
120
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Outline View in SwiftUI
1024jp
1
320
Arm移行タイムアタック
qnighy
0
310
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
110
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
C++でシェーダを書く
fadis
6
4.1k
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Unsuck your backbone
ammeep
668
57k
Statistics for Hackers
jakevdp
796
220k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Documentation Writing (for coders)
carmenintech
65
4.4k
Into the Great Unknown - MozCon
thekraken
32
1.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Transcript
Vue.js @wtnabe Kanazawa.rb meetup #64 2017-12-16(Sat) at IT-Plaza MUSASHI
Vue.js vue-devtools vue-cli runtime ( template ) data ( )
Vue.js
※ Vue.js v2 v1
Vue.js ES 5 compat ( since IE 10 / iOS
6 / Android 4.4 ) Progressive JavaScript Framework React AngularJS 1 React JS-centric AngularJS 1 Web Components-centric ( Google ) template
Component React Single File Component <template>, <script>, <style> Scoped CSS
Shadow DOM ( Web Components ) {{ }} placeholder @ v- directive ViewModel
None
React class HelloMessage extends React.Component { render() { return (
<div> Hello {this.props.name} </div> ); } } JavaScript JSX
AngularJS 1 <html ng-app> ... <div> <label>Name:</label> <input type="text" ng-model="yourName"
placeholder="Enter a name here"> <hr> <h1>Hello {{yourName}}!</h1> ng-directive
Vue.js v2 <template> <p>{{ greeting }} World !</p> </template> <script>
export default { data() { greeting: 'Hello' } } </script> JavaScript
, props , etc JSX, v- , {{ }} ,
etc
Progressive
None
None
Webpack ? Parcel ? Yarn ? Babel ? HMR ?
Rail
vue-devtools
vuejs/vue-devtools: Chrome devtools extension for debugging Vue.js applications. developer tools
Vue Component Tree Fire DOM
None
Vue.js mini ed debug
Small Footprint
vue-cli
vuejs/vue-cli: Simple CLI for scaffolding Vue.js projects scaffold
vue-cli Yarn Browserify + Browserify-HMR Babel + Babelify + vue-jsx
Vue + Vueify npm-run-all sprintf-js
fy JS import OK
vue-cli OK
None
progressive
template runtime
Vue2.x template
template https://jp.vuejs.org/v2/api/#template
https://jp.vuejs.org/v2/guide/installation.html# https://jp.vuejs.org/v2/guide/installation.html# https://jp.vuejs.org/v2/guide/installation.html# - https://jp.vuejs.org/v2/guide/installation.html#
template // Define a new component called todo-item Vue.component('todo-item', {
template: '<li>This is a todo</li>' }) Single File Component
None
data function
https://jp.vuejs.org/v2/guide/components.html#data - Vue 1 : data “ “
3 Vue.js Vue.js ― Web gihyo.jp … data function data
Warning
Vue warn var app = new Vue({ el: '#app', data:
{ message: 'Hello Vue!' } })
var app = new Vue({ el: '#app', data: function() {
return { message: 'Hello Vue!'; } } })
1. template runtime 2. data
vue-cli Single File Component progressive
Asset Bundling JS CSS jQuery plugin Flux
None
Enjoy Vue.js !!