Stimulus.js adds inbuilt support for stopping event propagation and preventing default action

It's very common in Stimulus.js to call the .preventDefault() or .stopPropagation() methods on an Event object immediately after a controller's action has been fired: import { Controller } from "@hotwired/stimulus"; export default class extends Controller { open(event) { event.preventDefault(); /* ... action logic ... */ } close(event) { event.stopPropagation(); /* ... action logic ... */ } } But it starts to feel repetitive after a while; which is why a PR introduced by yours truly to the hotwired/stimulus repo makes it so that you can do those things while defining the action descriptors themselves: <div data-controller="modal"> <a data-action="modal#open:prevent">Open</a&