$30 off During Our Annual Pro Sale. View Details »
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
Patterns of Patterns
denyspoltorak
0
350
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
1.8k
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
450
JETLS.jl ─ A New Language Server for Julia
abap34
2
460
AtCoder Conference 2025
shindannin
0
590
これならできる!個人開発のすゝめ
tinykitten
PRO
0
130
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
GISエンジニアから見たLINKSデータ
nokonoko1203
0
180
GoLab2025 Recap
kuro_kurorrr
0
780
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
認証・認可の基本を学ぼう後編
kouyuume
0
250
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
150
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
2
3.8k
YesSQL, Process and Tooling at Scale
rocio
174
15k
How to make the Groovebox
asonas
2
1.8k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
170
Statistics for Hackers
jakevdp
799
230k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
260
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
980
The Art of Programming - Codeland 2020
erikaheidi
56
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
75
Crafting Experiences
bethany
0
22
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