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
Stimulus 2.0-alpha - What's new?
Search
Matheus Richard
April 02, 2020
Programming
58
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Stimulus 2.0-alpha - What's new?
Light talk about the upcoming features of Stimulus.js.
Matheus Richard
April 02, 2020
Transcript
24 slides
Stimulus 2.0-alpha What’s new?
TLDR Two new APIs with a nice surprise
Data Map API
Data Map API • A way to pass data to
a controller. • Use cases: ◦ Storing small strings, such as URLs, dates, or color values; ◦ Bootstrapping a controller with a JSON object or array.
HTML Controller
However, the Data Map API only works with string values.
That means we must manually convert to and from other types as needed
Values API
Values API • Makes possible to define values (data maps)
in the controller itself; • Create properties to accessing them.
Usage The Value object keys are Data Map keys, and
the values declare their data types
Value Properties They work just as the Target API works
A nice surprise: Value Changed Callback
Usage Now it’s easier to make your good old HTML
template look modern
How many times have you seen the following pattern?
HTML Controller
We’re coupling the controller to the class name
Maybe using the Data Map API?
HTML Controller
Classes API
HTML Controller
All that with a very small cost
Unifying target attributes Both syntaxes will be supported, but using
the original syntax will display a deprecation message in the developer console
Excited? Start using it now! Just add it to your
package.json
More info at https://github.com/stimulusjs/stimulus/pull/202
That’s it Feel free to ask any question
More Decks by Matheus Richard
See All by Matheus Richard
The Fast Lane: Asynchronous Rails
matheusrich
0
81
Build in Private
matheusrich
0
75
Start TDDing in 5 minutes
matheusrich
0
130
3 Steps Every Test Should Take
matheusrich
0
120
Taming God Objects: easy, incremental and secure
matheusrich
1
140
BEM - A simple CSS methodology
matheusrich
0
58
De Repente 7
matheusrich
0
24
Other Decks in Programming
See All in Programming
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
850
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
11k
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
AmebaブログはKMPから卒業します
kmars0605
0
350
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
300
Distance field of Julia set
kinakomoti321
0
320
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
290
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
5.6k
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
610
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
280
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
460
GitHub's CSS Performance
jonrohan
1033
470k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
Leo the Paperboy
mayatellez
11
2.5k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
300
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
48k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
990