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
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
50
Build in Private
matheusrich
0
71
Start TDDing in 5 minutes
matheusrich
0
110
3 Steps Every Test Should Take
matheusrich
0
96
Taming God Objects: easy, incremental and secure
matheusrich
1
110
BEM - A simple CSS methodology
matheusrich
0
51
De Repente 7
matheusrich
0
17
Other Decks in Programming
See All in Programming
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
Fluid Templating in TYPO3 14
s2b
0
130
CSC307 Lecture 04
javiergs
PRO
0
660
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
740
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
AI & Enginnering
codelynx
0
120
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.5k
Basic Architectures
denyspoltorak
0
680
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
210
AI時代の認知負荷との向き合い方
optfit
0
160
Featured
See All Featured
The Language of Interfaces
destraynor
162
26k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
230
Chasing Engaging Ingredients in Design
codingconduct
0
110
Un-Boring Meetings
codingconduct
0
200
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Deep Space Network (abreviated)
tonyrice
0
49
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
We Have a Design System, Now What?
morganepeng
54
8k
The SEO identity crisis: Don't let AI make you average
varn
0
290
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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