Sprinkle Javascript with StimulusJS
summary
Monolithic server‑rendered app for online teachers uses Turbolinks plus Stimulus controllers to “sprinkle” behavior: each UI feature becomes one controller with data targets and actions, fetches server‑rendered HTML fragments and appends them (no JSON→DOM loop), and uses lifecycle hooks (initialize/connect/disconnect). The stack stays small, autocomplete and lightbox features are implemented this way, and the approach proves maintainable over two years on a real product.
AI-written summary · about
chapters (6)
- 0:00Introduction and background
- 5:25Why use JavaScript with SSR
- 7:33Introducing StimulusJS
- 13:22Stimulus controllers and targets
- 15:56Comparison with other frameworks
- 17:42Conclusion and resources








