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
Stimulus 2.0-alpha - What's new?
Search
Matheus Richard
April 02, 2020
Programming
0
49
Stimulus 2.0-alpha - What's new?
Light talk about the upcoming features of Stimulus.js.
Matheus Richard
April 02, 2020
Tweet
Share
More Decks by Matheus Richard
See All by Matheus Richard
The Fast Lane: Asynchronous Rails
matheusrich
0
35
Build in Private
matheusrich
0
63
Start TDDing in 5 minutes
matheusrich
0
94
3 Steps Every Test Should Take
matheusrich
0
76
Taming God Objects: easy, incremental and secure
matheusrich
1
93
BEM - A simple CSS methodology
matheusrich
0
48
De Repente 7
matheusrich
0
12
Other Decks in Programming
See All in Programming
git worktree × Claude Code × MCP ~生成AI時代の並列開発フロー~
hisuzuya
1
480
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
130
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
160
エラーって何種類あるの?
kajitack
5
310
[初登壇@jAZUG]アプリ開発者が気になるGoogleCloud/Azure+wasm/wasi
asaringo
0
130
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
310
エンジニア向け採用ピッチ資料
inusan
0
160
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
860
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
230
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
320
FormFlow - Build Stunning Multistep Forms
yceruto
1
190
CursorはMCPを使った方が良いぞ
taigakono
1
170
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
77
9.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
Bash Introduction
62gerente
614
210k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
YesSQL, Process and Tooling at Scale
rocio
173
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Six Lessons from altMBA
skipperchong
28
3.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
670
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Transcript
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