Comparisons (Svelte 4 vs. Svelte 5 and other Frameworks): https://component-party-runes.vercel.app/
Svelte:
Next light
Vue3:
Next light
331–340 of 404 posts
Comparisons (Svelte 4 vs. Svelte 5 and other Frameworks): https://component-party-runes.vercel.app/
Svelte:
Next light
Vue3:
Next light
Earlier quoted context omitted.
Seems like your comment cut off there, but if you're using class components in React, there will be repeated code, yes, which is why hooks were invented and why they enable you to reuse such code.
And lose most of the 'reactivity' since you'll now be doomed to manually track your own dependencies everywhere.
I find hooks are flexible enough that I tend to be able to implement more sane and manageable reactivity, not the opposite.
Maybe I’m misunderstand your issue, though.
Earlier quoted context omitted.
It's still much easier to manipulate DOM with jQuery than with any of the "modern times" APIs. Hell, even querying the DOM is still easier with jQuery.
Barely. document.querySelectorAll() has about 98% of the capability, and 10% extra too.
Earlier quoted context omitted.
We sometimes have to step back from our high tech bubble. Check out jQuery's usage on the web. The unbeatable juggernaut that React seems from up here clocks at under 5% market share. It's sobering. https://w3techs.com/technologies/overview/javascript_library
There might be a long tail phenomenon at play here. Do you have stats on number of developers using the tech or on page views for each framework?
So it’s either a strange distribution curve, with a bump in the neck and a colossal tail, or we’re trapped in a bubble and blinded by our own crazy reality distortion field.
As to number of developers, if a lot more of us are needed to write a tiny fraction of the pages, maybe that’s the symptom right there.
Earlier quoted context omitted.
Sorry, I should have been more clear, I was talking more about Vue and Svelte rather than Solid, which explicitly says they don't have 2-way binding due to learning about how dangerous it is and how React doesn't have it: https://www.solidjs.com/guides/faq#why-can-i-not-just-assign...
These discussions are so tiring. React has as much two way binding as vue - in vue v-model is just syntactic sugar for setting up event listeners and setting the value on an input element. Per the docs [0] Becomes It's such a small thing that it's crazy it's being discussed this much. [0] https://vuejs.org/guide/components/v-model.html
I recently wrote a game in Svelte 4, and went through a transition from using the /$ reactivity to stores. This looks MUCH nicer to deal with. Their examples seem to be missing some imports? Trying to use $state as shown with svelte@5.0.6 gives "ReferenceError: state is not defined".
Make sure you opt in to use runes! You can do it project wide or per component: https://svelte-5-preview.vercel.app/docs/runes
Opt-in is optional, no?
Earlier quoted context omitted.
It's still much easier to manipulate DOM with jQuery than with any of the "modern times" APIs. Hell, even querying the DOM is still easier with jQuery.
Barely. document.querySelectorAll() has about 98% of the capability, and 10% extra too.
DOM:
- few if any DOM methods work on an array of elements. Or even on a NodeList
- `querySelector`: returns null if not found, Element if found. Throws if there's a selector syntax exception.
So you have to wrap it in a try/catch and in a check against null when you need to use it
- `querySelectorAll`: returns NodeList, Throws if there's a selector syntax exception.
NodeList is not an array. It's so badly designed that even the .forEach method was only added to it two years after the method was introduced.
If you need anything but .forEach, it's better to call Array.from() on the result than deal with iterator shenanigans of it's sparse interface
But sure, "it has 98% and 10% extra", whatever that means.
And that's just two of the methods. Everything else is just as bad: 90s-era verbose imperative object-oriented API.
Earlier quoted context omitted.
I agree on both points. I used to quite like Redux but, between NextJS simplifying the page model and hooks/context being a lot easier for CRA-style apps, I just don't need them anymore for the sort of things I do. The real kick to the shins is that React Server Components did a number on most component libraries, too. I've been forced to go to Tailwind (and DaisyUI, which is pretty nice) just so my stuff doesn't req…
That was something that React Server Components definitely got backwards. The default state of the world before RSC was client components. If a mark is needed it should have been "use server" for the new style of components.
Isn’t this just qwik? Or have I missed something important?
They are too close for the similarities to be a mere coincidence
let count = $ref(0)
const double = $computed(() => count * 2)
watchEffect(() => {
console.log(double)
})
We started experimenting with this ling of thought almost 3 years ago:- First take (ref sugar), Nov 2020: https://github.com/vuejs/rfcs/pull/228
- Take 2, Aug 2021: https://github.com/vuejs/rfcs/pull/368
- Take 3, Nov 2021: https://github.com/vuejs/rfcs/discussions/369
We provided it as an experimental feature and had a decent number of users trying it out in production. The feedback wasn't great and eventually decided to drop it. https://github.com/vuejs/rfcs/discussions/369#discussioncomm...