Starting to sprinkle JavaScript with Simulus

I've been watching the new "Cosmic Coding with Symfony 7" series on SymfonyCasts, and today's video was about Stimulus - a "modest JavaScript framework for the HTML you already have".

As I'm comfortable with other frameworks, such as Vue.js and Alpine.js, I've usually skipped videos about Stimulus, but today, it caught my eye.

I was intrigued by it and experimented with it by refactoring a component from a project I am working on.

I like the organisation Stimulus provides by using JavaScript classes and controllers while keeping things simple in the HTML code.

I initially did this in Fractal but then created an example project using Stimulus with esbuild. It's now on my GitHub profile and includes other tools such as Nix, just, and Tmuxinator.

After this short evaluation, I like Stimulus and will use it on other components in this project, maybe using third-party Stimulus controllers - either directly or for inspiration.

Hat tip to Ryan Weaver and SymfonyCasts for showing Stimulus and Nick Janetakis for showing me esbuild.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.