Earlier quoted context omitted.
Modern React uses JSX which is then transformed at build time into function calls. You can write those function calls yourself, but it would be a tremendous PITA.
In this case, you could use `htm`: https://github.com/developit/htm#usage
Vue.js 3
181–190 of 308 posts
Re: Vue.js 3
#182Earlier quoted context omitted.
Why can't React do the same?
I'm not sure about React's capability with this, but Vue can very easily run with no build stage. You can load Vue from a CDN and use a couple lines of JS to point it at a DOM element in your app. Then you can write a plain JS Vue object (what goes inside the tags in a .vue file), and all this logic will apply inside the element you pointed it at. You can also write components, although that gets a little clunky with…
My first year of React development was without JSX even though we DID have a build step (I was categorically against it at the time. Things changed, haha).
Re: Vue.js 3
#183Earlier quoted context omitted.
Why can't React do the same?
I suppose it could, but there are annoyances with JSX defaults. For instance, Vue provides a method to explicitly declare your template variable delimiter syntax. Last time I looked this was requested of React, but not implemented, someone correct me if I'm wrong on that and it has come along in the last year or two. So.. lets say you wanna put some modern Javascript in some Django templates to make them look spiffy.…
Re: Vue.js 3
#184i learned vue2 3-4 years ago. should i learn vue3 or svelte instead?
About a year ago I had to tackle a few new web projects so I decided to give React/Angular/etc another look... and promptly went hunting for alternatives again, and that's how I found svelte. We've got 5-6 svelte-based projects in production now and have really, really enjoyed it.
All that said, I haven't looked at vue3 in depth yet, so maybe it's amazing, I dunno. :)
Re: Vue.js 3
#185Vue is the only one of the most popular 3 frameworks that can easily be used on a minimal basis to sort of "spruce up" old applications by selectively adding it here and there in the templates. Seems like they should try more marketing and community outreach toward that end. Gradual adoption is a feature / selling point not many web development frameworks can claim.
You can do the same thing with React though, you can arbitrarily render a React root anywhere, and an arbitrary number of times on the same page. For instance, I work on an app that was originally written in Backbone / Marionette, but I was able to write generic connectors to allow us to drop in React at any point in the tree. Similarly, we can go back to Marionette / Backbone at any point in the tree. It's made grad…
Re: Vue.js 3
#186Vue is the only one of the most popular 3 frameworks that can easily be used on a minimal basis to sort of "spruce up" old applications by selectively adding it here and there in the templates. Seems like they should try more marketing and community outreach toward that end. Gradual adoption is a feature / selling point not many web development frameworks can claim.
what you're responding to is marketing, which Vue has done an effective job of. thats fine, but it is unfair of you to conclude "Gradual adoption is a feature / selling point not many web development frameworks can claim."
Re: Vue.js 3
#187I was surprised to see an update to a contemporary JavaScript framework to be welcomed rather than boo’d by the average HN reader. That in itself is an accomplishment.
Re: Vue.js 3
#188Earlier quoted context omitted.
I think what is not mentioned with any of the big SPA frameworks is the amount of time you invest in the churn between versions. After dealing with this in Angular for a number of years, I ended up going with stock JavaScript for my recent projects and could not be happier. Performance is much better. I have a better understanding of what goes into the product. And, I am not constantly dealing with a new version and…
That's really an Angular problem; React and Vue have had very few breaking changes over the years.
Re: Vue.js 3
#189Re: Vue.js 3
#190Vue is the only one of the most popular 3 frameworks that can easily be used on a minimal basis to sort of "spruce up" old applications by selectively adding it here and there in the templates. Seems like they should try more marketing and community outreach toward that end. Gradual adoption is a feature / selling point not many web development frameworks can claim.
I don't know if you intended it this way, but the start of this comment makes it automatically flamebait.
Discussion around release announcements can quickly turn into a flame war. Please use caution.