Update StimulusJS State with Actions, Getters, and Setters

Share this video with your friends

Send Tweet

In this lesson I go over the basics of StimulusJS with a simple Counter example. I show how state in Stimulus actually lives in your HTML and how to bind functionality from your controller to your html with data attributes. I also demonstrate how to use actions to update the state and getters and setters to clean up the controller.

https://stimulusjs.org/handbook/origin