I’ve been on a 3 month journey de-jQuery-ing. Stimulus came into the picture about two months ago and I’m getting better, but…
I, like many have run into problems moving to Rails.ujs. I wrote a little gist Rails.ujs and Simulus approaches that describes that journey in more detail.
It describes three approaches. The old $.ajax approach used in jQuery, and two Rails.ujs approaches. I did this because I got tired on not understanding why things didn’t work, I just wrote a simple test page that didn’t muck with models and a lot of other stuff - just a simple controller and some html.slim and stimulus controllers.