Stimulus.js 2.0
11–20 of 140 posts
Re: Stimulus.js 2.0
#12Is there a convincing Stimulus vs. React-Rails post anywhere?
Re: Stimulus.js 2.0
#13Earlier quoted context omitted.
Htmx is more like all „we try to solve everything for you but fail“ solutions. The good part of stimulus is that it is only a binding library, no automatic content refetch etc. solution
I think the much touted "NEW MAGIC" will be the thing that does the automatic content refresh.
The StimulusJS handbook has an automatic content refresh example at https://stimulusjs.org/handbook/working-with-external-resour....
As for NEW MAGIC, DHH mentioned it will have a Rails server side aspect to it so I don't think we can compare these tools directly.
He did say other server side frameworks could implement similar behavior too but it would involve the framework having built-in support for websockets and job queues. This is based on a question I just asked him on Twitter at https://twitter.com/dhh/status/1334953167327547397.
So it sounds like NEW MAGIC will probably make it super easy to push / broadcast stuff from the server to the client, but to get everything working with a really nice API and it being seamless will require a substantial amount of work if you planned to re-invent it in another framework.
Re: Stimulus.js 2.0
#14[1] https://css-tricks.com/alpine-js-the-javascript-framework-th...
[2] https://thinkingelixir.com/podcast-episodes/021-tailwind-css...
Re: Stimulus.js 2.0
#15Is there a convincing Stimulus vs. React-Rails post anywhere?
Or a convincing Stimulus vs. Vue post would be helpful too, since Vue is so simple to sprinkle in as well, and doesn't pollute the html with data attributes as much as Stimulus.
If a new HTML element is added to the DOM and has a controller, it just works and is now active. This might not be the case with React or Vue, as you'd have to then bootstrap the component.
This makes Stimulus a really good combo when used with Turbolinks or partial Javascript responses.
Re: Stimulus.js 2.0
#16Are they implying one shouldn't use it if you don't have any HTML already?
Re: Stimulus.js 2.0
#17Re: Stimulus.js 2.0
#18Is Stimulus 2.0 the NEW MAGIC DHH was referring to? I was expecting something much bigger.
Re: Stimulus.js 2.0
#19Is there a convincing Stimulus vs. React-Rails post anywhere?
Re: Stimulus.js 2.0
#20Is Stimulus 2.0 the NEW MAGIC DHH was referring to? I was expecting something much bigger.