Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
51
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
43
Build in Private
matheusrich
0
71
Start TDDing in 5 minutes
matheusrich
0
110
3 Steps Every Test Should Take
matheusrich
0
92
Taming God Objects: easy, incremental and secure
matheusrich
1
110
BEM - A simple CSS methodology
matheusrich
0
50
De Repente 7
matheusrich
0
16
Other Decks in Programming
See All in Programming
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
150
gunshi
kazupon
1
120
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
AIコーディングエージェント(skywork)
kondai24
0
210
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
270
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
440
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
4.1k
開発に寄りそう自動テストの実現
goyoki
2
1.4k
Deno Tunnel を使ってみた話
kamekyame
0
250
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Deep Space Network (abreviated)
tonyrice
0
22
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Side Projects
sachag
455
43k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
580
Paper Plane (Part 1)
katiecoart
PRO
0
2.1k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
100
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Exploring anti-patterns in Rails
aemeredith
2
210
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