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
Riot: all about v2 to v3
Search
Tsutomu Kawamura
July 27, 2016
Programming
7
3.7k
Riot: all about v2 to v3
「Riotのウラガワ: ver3とソースコード解説」
Riot.js 勉強会 @Tokyo #1
http://riotjs-jp.connpass.com/event/35724/
Tsutomu Kawamura
July 27, 2016
Tweet
Share
More Decks by Tsutomu Kawamura
See All by Tsutomu Kawamura
Connect your library to the world
cognitom
0
95
JTF2018
cognitom
5
1.2k
Riot: changing on v3 and its companion tools
cognitom
0
120
LLoT Night - Riot.js
cognitom
1
920
Felt - a simple web server with the power of the future
cognitom
0
300
Create A Small Studio in A Cafe
cognitom
2
890
Riot.js in WPD-Week
cognitom
19
11k
Riot and Components
cognitom
4
580
Cooking Automation
cognitom
1
530
Other Decks in Programming
See All in Programming
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
110
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
270
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
150
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
110
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
1
290
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.2k
Vue3の一歩踏み込んだパフォーマンスチューニング2024
hal_spidernight
3
3.1k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
Synchronizationを支える技術
s_shimotori
1
150
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
Done Done
chrislema
181
16k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Language of Interfaces
destraynor
154
24k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Testing 201, or: Great Expectations
jmmastey
38
7k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Thoughts on Productivity
jonyablonski
67
4.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
14
1.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Transcript
Tsutomu Kawamura @cognitom Librize LLC / OpenSource Cafe, Shimokitazawa RiotͷϥΨϫ:
ver 3ͱιʔείʔυղઆ
cognitom
None
$PEFS%PKP ϦϒϥΠζ
HJUIVCDPNDPHOJUPN
ࠓɺ͢͜ͱ
w 3JPUͷۙگ w 3JPUͷ։ൃମ੍ w ˠͰԿ͕มΘͬͨͷ w ιʔείʔυΛ͍ͯΈΑ͏ ͜ͷ͋ͨΓΛͦ͏͔ͱ
None
3JPUͷۙگ
ՆWFS ༧ఆ
͡Θ͡Θ͖ͯΔ
͏͙͢˒,
(JU)VCͷελʔ ˒ ίϯτϦϏϡʔλ ਓ ϓϧϦΫΤετͷ ݅ 2JJUBͷهࣄ ݅ 3JPUͷͻΖ͕Γ
W W ϑΝΠϧαΠζ ,# ,# ެࣜϦϙδτϦ ݸ ݸ ίΞίϛολʔ ਓ
ਓ एׯΆͬͪΌΓ
None
None
3JPUͷ։ൃମ੍
ίΞίϛολʔͷډॴ
݄W ϑΟϯϥϯυ
य़ εΠε͔Β ΞδΞͷ࠭യ
Ն ϝΩγί͔Β ձ৬తͳ ςΩαε͔Β ౦ژ͔Β
Ͳ͔͔͜Β ࣌ʑ߱ྟ
͕ɺ3JPUͰ͍ͬͯΔ͜ͱ
w ॳظͷςετେྔՃ w TUZMFλάରԠ w 4DPQFE$44ରԠ w υΩϡϝϯτͷࠃࡍԽ ͷίϯτϦϏϡʔγϣϯ w
SJPUFYBNQMF w SJPUSPVUF w LBSNBSJPU w SPMMVQQMVHJOSJPU ΄͔
None
ˠͰԿ͕มΘͬͨͷ
ͰՃ͞ΕΔػೳɺ ͱ͍͏ΑΓɺ ͔ΒมΘ͖ͬͯͨͱ͜Ζ
ςετ
None
4DPQFE$44 <p>WP-D Week</p> <style scoped> :scope { /* ίϯϙʔωϯτͦͷͷͷελΠϧ */
} p { /* ίϯϙʔωϯτͷpλάͷΈʹ༗ޮ */ } </style> Wʙ
ZJFME <my-tag> <p>Hello <yield/></p> this.text = 'world' </my-tag> Wʙ <my-tag>
<b>{ text }</b> </my-tag> <my-tag> <p>Hello <b>world</b><p> </my-tag>
NJYJO var logMixin = { log: function(m) { console.log(m) }
} Wʙ <my-tag> <h1>{ opts.title }</h1> <script> this.mixin(logMixin) this.log(‘hey!’) </script> </my-tag>
SJPUSPVUF riot.route('/fruit', function(name) { console.log('The list of fruits') }) riot.route('/fruit/*',
function(name) { console.log('The detail of ' + name) }) Wʙ
SJPUDPNQJMFS UNQM Wʙ
SJPUDMJ PCTFSWBCMF Wʙ
EN ES FR JA RU ZH DE riotjs.com υΩϡϝϯτͷࠃࡍԽ
&YBNQMFT
HMPCBMNJYJO var logMixin = { log: function(m) { console.log(m) }
} riot.mixin(logMixin) Wʙ <my-tag> <h1>{ opts.title }</h1> <script> this.log(‘hey!’) </script> </my-tag>
<div riot-tag="my-tag"></div> <div data-is=“my-tag"></div> <my-tag></my-tag> Wʙ EBUBJT
<dl> <virtual each={item in items}> <dt>{item.key}</dt> <dd>{item.value}</dd> </virtual> </dl> W
ʙ WJSUVBM
w $ISPNFͷ ϓϥάΠϯͰࠔΔ݅ w SJPUDTQKT Wʙ $POUFOU4FDVSJUZ1PMJDZ $41ରԠ
ߴԽ࠷దԽ ϧʔϓͷڍಈͷpY N @@ N
JGଐੑͷڍಈ Wʙ w JGଐੑΛ͚ͭͨ࣌ʹɺ USVFʹͳΔ·ͰϚϯτ͞Εͳ͍ w JGଐੑΛ͚ͭͨ࣌ʹɺ GBMTFͰϚϯτ͞Εͯ͠·͏ ॏཁ
όϯυϧํ๏ w ಠࣗ w TNBTI w SPMMVQ
None
ιʔείʔυΛ͍ͯΈΑ͏
·ͣΫϩʔϯ
ίʔσΟϯάελΠϧ w ߦͷηϛίϩϯͳ͠ w ͍ͷ͕ਖ਼ٛ w ڍಈΛཧղͯ͠͏ w JGจGPSจͰɺলུՄೳͰ͋Ε\^ΛΘͳ͍ w
ԋࢉࢠͷධՁॱΛਖ਼͘͠ߟྀɻͳ ΛΘͳ͍ w &4Ͱॻ͕͘ɺ ม࣌ʹ͘ͳΔ$MBTTͳͲΘͳ͍ ݱࡏͷͱ͜Ζ w ಠࣗͷؔΛ༏ઌతʹ͏ ໘͕͋Δ w 0CKFDUBTTJHO Ͱͳ͘ɺFYUFOE w <>GPS&BDI Ͱͳ͘ɺFBDI
όϯυϧํ๏ w ϏϧυͳͲͷλεΫ࣮ߦʹNBLFΛ͏ɻ w όϯυϥ3PMMVQ w &4ม#BCFM w PCTFSWBCMF UNQM
DPNQJMFS֎෦ϦϙδτϦ ˞͔ΒɺSJPUSPVUFؚ·Εͳ͍ w ༻్ผʹෳͷόʔδϣϯΛ༻ҙ
w ެ։"1*MJCSJPUKT w 3JPUͷίΞ෦MJCCSPXTFSUBHDPSFKT w λά%0.ૢ࡞ͷଟ͘ϢʔςΟϦςΟؔͰ w λάʹؔ͢ΔͷUBHIFMQFSKT w %0.ʹؔ͢ΔͷEPNIFMQFSKT
w ͦͷଞNJTDKT w λάͦͷͷMJCCSPXTFSUBHUBHKT w %0.ͷύʔε ͱ͍͏ΑΓUSBWFSTF QBSTFKT w දݱ FYQSFTTJPO JGKT FBDIKT OBNFEKTͳͲ w ߋ৽VQEBUFKT w ఆHMPCBMWBSJBCMFTKT ϑΥϧμߏ
None
None
None
None
Ϛϯτ͢Δ·Ͱ w SJPUUBH ؔͰొࡁΈͷɺλάͷ࣮Λऔಘ w λάΛΠϯελϯεԽ w λάͷ࣮ )5.-ςϯϓϨʔτ ΛJOOFS)5.-ʹಥͬࠐΉ
w ύʔε͢Δɺͱ͍͏ΑΓ%0.Λτϥόʔεͯ͠ɺղੳ w ༩͑ΒΕͨσʔλͰɺλάͷ༰Λߋ৽ w ςϯϓϨʔτม FYQSFTTJPO Λߋ৽ w ϚϯτྃΠϕϯτ
<my-tag> <p>{ message }</p> <script> this.message = "Hello!" </script> </my-tag>
riot.tag2(‘my-tag’, '<p>{ message }</p>’, ‘', '', function(opts) { this.message = "Hello!" } ) riot.mount(‘#main’, ‘my-tag’) #main DOM flag flag <p> { message } </p> <p> Hello! </p> ⁞ <p> Hello! </p>
None
None
None
͘ோΊͯΕɺେৎ
݄ ݄ ৄ͘͠2JJUB
13͓ͪͯ͠·͢ ϓϧϦΫΤετ
None
5IBOLZPV GCDPNHSPVQTUPLZPSJPU HJUUFSJNSJPUSJPU
ਫɾ༵ ԼͰ ళ൪ͯ͠·͢ ؾܰʹฉ͖ʹདྷͯ ͍ͩ͘͞