People with a large production app with stimulus, how is it going?

I’m working on a legacy app and I’m trying to project where we will be after several upgrades and cleanup. It seems like StimulusJS (Hotwire, etc) makes sense for it. We have jQuery _everywhere_ and it’s a nightmare.

Curious how others are doing w production scale apps with Stimulus. Are people able to follow conventions? Is it easy to find code that’s triggering and edit it? Is there code focus, ie: changing X doesn’t break Y?

For context, my app is a Spree Commerce app, pretty heavily customized.

4 thoughts on “People with a large production app with stimulus, how is it going?”

  1. Hey, I’m in this situation too! I have jQuery _everywhere_ and it _is_ a nightmare. I’m considering StimulusReflex – and if I understand it correctly – would allow me to use StimulusJS to replace jQuery too…?

    Sorry, can’t be of much help. But, I’m interested in what anyone else had to say – and I’m glad I’m not the only one facing this problem lol

  2. I’m currently exploring the feasibility and benefits of switching from our backend/frontend -> rails/react application into a Rails monolith with Turbo and Stimulus (Hotwire).

    I don’t know if it could help you but i found this: really helpfull for not writing that much JS and keep it clean

  3. > We have jQuery everywhere and it’s a nightmare.

    That sounds like my project! We had CoffeeScript in place, inline JavaScript in the views & balls of jQuery which were really had to know if we needed them any more. It was also causing weird problems where we’d hear a user had a problem, but it was very hard to know what the issue was.

    We looked at a few options to sort out the mess:

    1. Embrace React – It was tempting, but actual the App wasn’t the interactive so it would have been overkill.
    2. No JS – Most the stuff the JS was doing was either handled by the browser, or could be pushed off into an extra page load.
    3. StimulusJS

    We picked StimulusJS, it has been pretty good. We ended up removing bits of the jQuery in small parts, then one day just deleted all the old JS.

    The end result was way easier code to reason about, and a lot less JS stuff going on on the app, the JS which was left was all in Stimulus components (Which were nice and easy to test).


Leave a Comment