Welcome to Better StimulusJS 🎉
An Opinionated Collection of StimulusJS Best Practices
StimulusJS, the modest JavaScript framework by Basecamp is gaining widespread traction. It powers Basecamp and HEY, among others, and is a natural choice for Rails developers. That said, it fits any codebase that embraces server-side generated HTML and lightweight JS sprinkles.
Unfortunately, the official docs lack clear guidelines and best practice examples. Thus, this guide tries to present advice for newcomers and intermediate Stimulus programmers.
Covered topics include:
- Architecture
- DOM Manipulation
- Error Handling
- Events
- Integrating Libraries
- Interaction
- Lifecycle
- SOLID
- With Turbo
Stay Informed
Get updates when new articles are posted:
Who made this?
This site is maintained by Julian Rubisch, Stimulus Reflex core team member and senior Rails developer. A range of enthusiast volunteers helps keeping articles up to date and quality-assured.
Disagree or have comments?
Take a look at https://github.com/julianrubisch/better-stimulus for ways to contribute and/or discuss content.