Automate Value Changes

Let's learn about how to automate value changes.

We'll cover the following

Automating Value Changes

Another useful feature of the Stimulus Values API is that it includes a callback method called <value name>Changed, which is automatically called after a Stimulus value is changed. In other words, we could rewrite our toggle controller as follows:

Get hands-on with 1000+ tech skills courses.