Ditto. I think if you are an experienced web app dev, understand the pros and cons of something like Stimulus, and set out from the beginning of your project to make PRODUCT decisions within the constraints of something like Stimulus and being more SSR. Then it is a great tool.
Anything more complicated though, and you are better off with Vue, React, Etc
I am an experienced web dev and went into Stimulus excited to have something that seemed straightforward, but was disappointed. Vue has the flexibility to do SSR HTML with a bit of javascript for behavior way that works well for me.
Just being able to put
<button @click.prevent="save(<%= id %>)">Save</button>
Instead of:
<button data-action="click->some--long--path-to#save" data-id="<%= id %>">Save</button>
I've personally hit the point where I feel like React is my go to for anything - especially with Gatsby.
* If I'm keeping it simple, it's barely different than pure HTML.
* Free templating
* If I need Javascript (which I likely will), it's extremely easy to add anything I need.
I like React a lot and I sometimes use it for my own projects (e.g. I just finished https://techadequiz.com/)
However, I don't think React does "add some Javascript behavior to my Rails views (or backend framework equivalent)" very well (which is what I think Stimulus is trying to do). I mean you have solid support for React in the Rails ecosystem, but you turn your HTML-rendering responsibilities over to React Javascript functions.
I haven't had a problem. In my experience, I can actually get content up more quickly than a traditional CMS-type system.
Gatsby does some intelligent bundling so each page is pretty much self-bundled.
* Root HTML file
* Core, common JS (cached after first load)
* Page specific JS (also cached on subsequent loads)
For me, this is 257 kB uncompressed - with most of that being the Root HTML file (I realized I don't have minification or Gzip on - which takes that down substantially). Not a tiny payload, but the content is all static so the response comes back extremely quickly.
Even at slow 3G speeds, I barely get a flash. The actual page loads just about as quickly as HN.
With modern internet, the load time is nearly instant AND is literally instant on subsequent page loads (since most of the payload is locally cached).
It's not. If you're building a backend heavy use-case, there are plenty of good options.
Gatsby is geared towards building web pages, not web applications. If you're implementing Gatsby, you're building essentially HTML pages, possibly with some JS functionality.
Anything more complicated though, and you are better off with Vue, React, Etc