Earlier quoted context omitted.
It feels very much like Knockout which reminds me of the same frustrations
Huh? I think Knockout.js was awesome for its time! To me, Vue.js feels like Knockout’s spiritual successor. What did you find frustrating about Knockout?
Stimulus.js 2.0
101–110 of 140 posts
Re: Stimulus.js 2.0
#102Earlier quoted context omitted.
What UI behaviors necessitated you to move beyond stimulus? Could you provide an example?
Sure! One typical example is a component that collects (and displays) education history provided by the user. I'll list out just a few key UI behavior: * A "read" view which represents a list of containers with titles that show each instance of a users answer (for example, if you provided 5 sets of answers, such as 5 universities you attended, we need to show those 5 in some sort of preview form on the page) * A butt…
And it's working great?
Re: Stimulus.js 2.0
#103Earlier quoted context omitted.
> "PETAL stack" of Phoenix, Elixir, Tailwind, Alpine.js, and LiveView Oh, finally a hipster stack after my own heart. My initial stack used Web Components instead of Alpine.js, but after one year trying to make it work (using lit-element) I'm battered, bruised and I declare Web Components a failed piece of technology [1]. Alpine is interesting, but not powerful enough for my use case, which is encapsulating common UI…
Shadow dom is optional for web components, web components are still useful without it, so I hardly see how that could be a reason for "failed piece of technology". Also, did you try with pure JS ? no lit ? I just removed StencilJS from my component to go pure-JS and it turns out I really prefer it that way, maybe it would suit you too to do WC without any additional JS lib ?
Re: Stimulus.js 2.0
#104What's the difference between Pjax and Turbolinks? Just a generic version of the same thing? Could Stimulus [Reflex] be hacked to work with Django or does it have strong ties to Rails?
Re: Stimulus.js 2.0
#105Earlier quoted context omitted.
Shadow dom is optional for web components, web components are still useful without it, so I hardly see how that could be a reason for "failed piece of technology". Also, did you try with pure JS ? no lit ? I just removed StencilJS from my component to go pure-JS and it turns out I really prefer it that way, maybe it would suit you too to do WC without any additional JS lib ?
> Shadow dom is optional for web components Not the OP, but slots are part of the shadow DOM spec, so if you don’t want isolated styles, you have to forego slots. I tend to build my app scaffolding with wrapper components that provide layout and/or functionality to their child components via slots, so as much as I like the idea of WebComponents they’re a complete non-starter for me.
Re: Stimulus.js 2.0
#106Re: Stimulus.js 2.0
#107I have great hopes that Stimulus 2.0 and Ruby 3.0 will put Rails back in the spotlight as the sane alternative to SPA abuse. Ruby and Rails have some really talented people on their teams and there's something special about the Ruby language which makes it such a fertile environment for innovation. Only Clojure compares in this respect.
Apparently Stimulus 2.0 is part of that directional change
Tweets: https://twitter.com/dhh/status/1334916143010680833?s=20
Re: Stimulus.js 2.0
#108We adopted stimulusjs a couple of years ago for adding some basic interactivity on our pages and it was a decent tool, but we quickly grew out of it once we started adding more complex (form based) front-end behavior involving lots of state changes. We're currently trying to migrate a significant amount of stimulus code over to react. Not knocking on stimulusjs, but just be wary that it does not grow well with increa…
I believe even Basecamp (or one of their products) uses React on a more complex interaction.
Re: Stimulus.js 2.0
#109I worked with Stimulus for about a month and found it to be frustrating: 1. There is not a lot of documentation 2. They don't provide any testing guidelines, the best I've found is hand-wavy test-with-a-browser stuff 3. Everything is essentially global 4. Functions are disconnected from their parameters, i.e. I can't tell which bits of data a function is using without digging through a bunch of code. 5. Putting state…
Doesn’t vuejs require you to keep your state in a store object (data: {}) and render html via js though?
It’s how people use Vue as a jQuery replacement.
Re: Stimulus.js 2.0
#110Unpoly https://unpoly.com is also worth a look if you are interested in these things. It combines Turbolinks and Stimulus functionality in a very usable way.
Happy unpoly user here too. I think it is way better than stimulus, turbolinks, htmlx, alpine, etc. Just doesn't have as good marketing as those.
And maybe documentation too. Turbolinks has really good docs and conceptually it's pretty easy to get going (1 line of JS and learning a few event handlers). Alpine and StimulusJS have really good docs / guides and tons of practical examples if you Google for a specific problem you're trying to solve.
Unpoly's docs seem like it's mostly an HTML front-end to their API spec with very few examples. It's kind of difficult to figure out how to use most of what it does. There's also very little practical examples of using it if you Google around.
I've heard of it in the past but never got into it because of the above.