From cb429930b0713852b2687c0b307327e8462400ef Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 30 Mar 2024 00:24:05 +0000 Subject: [PATCH] Add daily email for 2024-03-28 Starting to sprinkle JavaScript with Simulus --- source/_daily_emails/2024-03-28.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 source/_daily_emails/2024-03-28.md diff --git a/source/_daily_emails/2024-03-28.md b/source/_daily_emails/2024-03-28.md new file mode 100644 index 00000000..bc7eb86a --- /dev/null +++ b/source/_daily_emails/2024-03-28.md @@ -0,0 +1,28 @@ +--- +title: Starting to sprinkle JavaScript with Simulus +date: 2024-03-28 +permalink: archive/2024/03/28/starting-to-sprinkle-javascript-with-simulus +tags: + - software-development + - symfony + - stimulus +cta: ~ +snippet: | + Have you used Stimulus? I took it for a test drivet this week. +--- + +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][repo] 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. + +[repo]: https://github.com/opdavies/stimulus-esbuild-example