
Vue.js 2.1 Released - sadiqmmm
https://github.com/vuejs/vue/releases/tag/v2.1.0
======
CharlesW
For folks who haven't tried Vue yet, I just completed my first project with it
and I'm really excited about using it more.

Specifically, I used learning Vue as an opportunity to upgrade a simple
jQuery-based SPA (with a PHP backend) to ES6, JS modules and Vue. It was a
little hairy to bite off all of that stuff at once, but the Vue community was
really helpful. In contrast to more monolithic frameworks I didn't have to
port everything at once, and the re-implementation of the bits I did port are
_sooo_ much cleaner.

FWIW, there's a highly-rated Vue.js 2/Vuex Udemy course on sale for an impulse
price of $14 (normally $190) as I type this. With the caveat that I _just_
bought the course myself, at that price it seems like a useful resource even
if you only have a cursory interest in Vue.

[https://www.udemy.com/vuejs-2-the-complete-
guide/](https://www.udemy.com/vuejs-2-the-complete-guide/)

~~~
no1youknowz
Thanks. With this coupon "CNETBF2016" it's now just $10 and I bought it at
that price!

~~~
afghanPower
Guessing that's an affiliate promotion code?

~~~
no1youknowz
Not from me. I'm just trying to pass on the savings to HN users. :)

------
w0utert
So far my Vue.js experience has been great. Even though I don't particularly
enjoy front-end development and the tools and techniques I'm supposed to use
for them, Vue.js has been a breath of fresh air between my frustrations with
HTML, Javascript, npm, CSS, HTTP and all the other things that are needed to
stitch everything together. It really is a great framework.

The one thing that does still bug me these days is that even now that Vue 2.1
is out, many components I'd like to use are still not compatible with Vue 2.x,
and almost all the Vue tutorials, questions, solutions, etc. I find are about
Vue 1.x, which is mostly incompatible with Vue 2.x. But that should improve
over time, of course.

~~~
ohstopitu
are there any tutorials that would help a beginner start on that front?

~~~
thewhitetulip
I'm writing one! [https://github.com/thewhitetulip/intro-to-
vuejs](https://github.com/thewhitetulip/intro-to-vuejs)

~~~
misterhtmlcss
It's still pretty ripe big guy. You keep promoting it like you are further
along. I kept looking thinking there was more and there wasn't. Great start
and I'm even happy to assist you, but ease up on the promo unless yare
inviting people to contribute.

Just a suggestion as someone who is keen to see a ton more on 2.x and is even
also keen to help others like yourself; not against you or your efforts at
all.

~~~
thewhitetulip
Pls don't take this personally, but I am not entirely sure what the problem
is. I didn't say "I wrote one", I said, "I am writing one", which means it is
not yet finished and is a work in progress.

Any and all contributions are always welcome.

------
myf01d
I am sorry if this sounds too ignorant, are frameworks like Vue.js (I actually
read the guide and understood some wonderful things about its philosophy since
I am actually developing backend mainly) or React, etc.. reasonable to use in
websites in general (instead of jquery or taking some tasks from it) or they
actually only reasonable for mobile web applications and SPAs?

What about the SEO and search engine rendering to custom HTML elements like in
Vue.js components? is it okay or affects SEO?

~~~
untog
I can't speak to Vue, but React is overkill for many sites. The virtual DOM
etc is incredibly useful for sites that update the page very frequently, but
if the only thing you're making is a static site and a contact form, you don't
need React.

That said, I do like the React model of creating components (and suspect this
is why so many people use it when it's unnecessary). I'm looking forward to
browsers implementing custom elements so that we can all compinentise this way
without the overhead of a large JS framework.

~~~
dalailambda
While the virtual DOM is a component in React's popularity, the main thing
that I believe people use it for is the functional, one way data flow it
allows you to use combined with the component model.

------
vitomd
I don´t know why Riot.js (another js framework) don't attract more people. I
used it and it´s awesome. Today they launched the 3.0.0 version
[http://riotjs.com/release-notes/](http://riotjs.com/release-notes/) . Here is
a quick introduction [http://vitomd.com/blog/coding/hello-riot-js-quick-
tutorial-a...](http://vitomd.com/blog/coding/hello-riot-js-quick-tutorial-
about-this-awesome-lib/) I highly recommend it.

~~~
edoceo
I also love Riot. It makes custom tags. It's easy to author and debug w/o so
many additional tools. Serverside or client-side rendering. Was a snap to plug
Riot in to replace jQuery "components" in a mostly PHP driven app.

------
buckbova
>
> [http://mithril.js.org/comparison.html](http://mithril.js.org/comparison.html)

> Vue's implementation cleverly hijacks array methods, but it should be noted
> that Javascript Arrays cannot be truly subclassed and as such, Vue suffers
> from abstraction leaks.

Can anyone who knows how vue is implemented explain this statement?

~~~
rk06
they are talking about limitations of change detection in Array [1]. It is
technically true, but practically, it is not much (if you are aware of it)

[1] :
[http://vuejs.org/v2/guide/list.html#Caveats](http://vuejs.org/v2/guide/list.html#Caveats)

------
AtticusTheGreat
I've been using Vue.js for a new project and it is a breath of fresh air after
using React. It has all the benefits of Knockoutjs (which was my gateway into
these types of frameworks), but much nicer in-code organization (I'm looking
at you ko.observable).

------
dpnewman
I am always looking for the fastest way to build a complete app. Brought me to
Rails. Then to Meteor/React (which was mixed). Then some Rails/React which is
ok.

Vue looks really appealing on the simplicity and completeness side.

I would like to know from people using Vue what backends you're using. In
order to complete the loop - the simplest stack overall Vue+???.

~~~
ptrikutam
I've used Vue w/ Rails so far and it's been pretty good. The one real
complaint is that I really wish is that I could use Vue components (.vue
files) in a better integrated way with the Rails asset pipeline.

react-rails does this really well, making JSX transformation a drop-in gem,
vs. having to set up some kind of front end task runner of sorts and
constantly having to commit compiled files and such.

Beyond that, Vue has been amazing, and I really love it.

~~~
dpnewman
Thanks for the reply. Yea the rails asset pipeline integration seems an issue
and Vue hot reload capability is also something I'd want workings seamlessly
(not sure if that would be problematuc). Perhaps best to just use rails as API
server. Then be able to create complete Vue front without struggling w
integrations.

------
aikah
Nice, I love Vue.js it is light weight yet fulfill 90% of the needs of a large
SPA without a third party language, some bureaucratic dependency injection and
without getting in the developer's way by mandating this or that build tool.
But competition is good so I'm glad there is a front end framework for
everyone out there.

~~~
blitzo
The sentiment 'competition is good' in the context of Javascript universe is a
bit ironic since that's what led us to the recent fatigue grievance.

~~~
aikah
People have different requirements, there is not a single framework that would
make everybody happy. The issue isn't the the number of frameworks by the way
but the complexity of the build tools in the context of Nodejs.
Grunt,Gulp,Babel transpilers and co, they are not frameworks, they merely
transform assets, yet they make JS development extremely complex and
bureaucratic.

------
shams93
I'm going to build a vuejs markdown site editor similar to Gatsby I just don't
like Facebook it's refreshing that an independent project is gaining
popularity the server side rendering is a big deal when you want to support
mobile well.

~~~
peller
Gatsby is awesome. Would love to see something like it without FB's licensing
attached to the underlying libraries. Please do a Show HN when you've got
something more-or-less working :)

------
sync
Is this looking a lot like Angular 1.x to anyone else? I've heard it's
actually more similar to React but I'm not seeing it... ?

~~~
threatofrain
It's like Angular in that they use a similar templating language, and it's
like React in that they're using a component-based declarative DOM API.

~~~
kabes
Angular also has a component-based declarative DOM API. Always had, but since
version 1.5 it's more explicit.

------
butu5
Pleasure to work in Vue.js framework. Very easy learning curve. Simplicity is
the biggest strength of this framework.

I have created few tutorials on Vue.js.

[https://m.youtube.com/playlist?list=PLJ6Y8JfXAV-8_2lHNgP1DhC...](https://m.youtube.com/playlist?list=PLJ6Y8JfXAV-8_2lHNgP1DhCwvB6le3rty)

------
overcast
So glad this project is gaining more and more traction. Been using it since
very early releases, when I was sick of dealing with overly complex front end
libraries.

------
od14
I'm really excited about the scoped slots feature. Finally it's really easy to
create components that can be customized by the user from the outside. For
example, it's now really easy to create a data table (with features like
filters and sort), and with each row showing not only the data text, but also
any other feature you might want to embed in it (like attach click listeners
to each row, or popup some menu on hover).

I believe there was a way (probably a complicated hacky way) to achieve this
previously too, but I never investigated it too much. Now it's really easy.

Kudos to the Vue team for this release!

------
M4v3R
In case someone user Meteor - Vue plays very nice with Meteor and there exists
a great integration package [1], which means if you're familiar with Meteor
you can write full stack applications with it very easily and quickly with it.
The package supports hot module replacement out-of-the-box. It's also dead
simple to start using it, if you already have Meteor installed it's a matter
of running "npm install" and "meteor".

[1] [https://github.com/Akryum/meteor-vue-
component](https://github.com/Akryum/meteor-vue-component)

------
seanwilson
I'm looking to move a few projects from Angular 1. What do developers think of
migrating to Angular 2 vs Vue for this? I've played with Angular 2 but can't
shake the feeling that it's overly complex.

~~~
royal_ts
You may want to check out Aurelia too. One of Angulars main devs left the
Angular Team because of its direction and build Aurelia the way Angular should
have been.

I played with it a bit and what's awesome about it that you just write plain
JS most of the time. No weird stuff like JSX and whatever. Docs arn't that
great tho

~~~
rpeden
It's worth noting that the developer who split from the Angular team to create
Aurelia was also the developer of Durandal, which is quite a nice (and
underrated) framework.

Aurelia is a sort of the spiritual successor to Durandal.

------
nkg
I still wonder why they moved the events from the constructor to the
instance...

Before 2.0:

new Vue({ el: "#el", data: someData, events: { myevent: function(){} } });

after 2.0 :

vm.$on('myevent', function () {})

~~~
mixedCase
Events in Vue 2 are now supposed to be used only for child -> parent component
communication. If your needs are more complex then you're supposed to use
Vuex.

------
bedros
I found this guy creating a todo app using all popular js frameworks

[https://github.com/tastejs/todomvc/tree/master/examples](https://github.com/tastejs/todomvc/tree/master/examples)

including vue.js riot.js react, meteor, angular 1,2 dojo, duel, ember, jquery
....

it's a great way to compare frameworks

------
jaequery
I really miss 1.0's inline way of writing javascript anywhere inside the dom
(attributes) via {{ execute_raw_js_code() }} as well as the ability to run
filters on it. Is there anyway to get them back on Vue 2? I have to admit,
this was a major step back for me when upgrading to Vue 2 from Vue 1.

I also really loved the Vue 1's way of handling transitions. Now having them
inside it's own wrapper really diminishes the elegance I felt from Vue 1.

Wish there was some ways to get them back instead of having to downgrade.

~~~
mixedCase
Yes. Use computed properties.

~~~
jaequery
Yeah you can use that but still you lose the liberated feeling of being able
to execute js anywhere directly on the dom, which I actually appreciated quite
a bit.

------
woogley
I'm currently using (and enjoying) my first Vue project. I have to say the
camelcase support for JSX events feels like a step backwards. The `on-` prefix
had a nice semantic way of telling you that thing is an event (either DOM or
$emit from component). Now there's just this implicit `onFoo` which could be
an event, or could be a prop, maybe component will invoke it directly like in
React, maybe it will $emit, who knows?

------
tiv
I've been waiting for scoped slots for so long. I've implemented several
workarounds since I started using Vue a year ago. Creating a directive to pre-
compile a slot template in the child scope in Vue 1, and then once Vue 2
rolled around, making lots of functional components and passing them around.
So glad they finally added this.

------
revskill
I've been a long time React and Angular user, but is still sick to implement
correctly enough SSR for my projects. And VueJS just did it elegantly ! I must
say, thank all React + Angular folks as the pioneer for better CHANGES. This
is THE time for us to change. Really.

~~~
solidr53
What is a correctly enough SSR? We use react in most of our projects with
server side rendering without any problems at all.

[https://github.com/ueno-llc/starter-kit](https://github.com/ueno-llc/starter-
kit)

------
sergiotapia
I tried to use Vue 2 for a pet project but couldn't get the routing to work.
It seems the router was lagging behind in versions and there were no guides on
"router 2.0".

Does this version have a routing guide and production ready routing solution?
That's pretty important.

~~~
dimgl
We're using Vue and its router in production since 1.x, so I'm not sure where
you got that impression...

~~~
thewhitetulip
I would like to know more about your use of Vue and the router in production.
Tips/best case guidelines?

~~~
dimgl
If you have a relatively large app and having URLs makes sense, the router is
a no brainer.

No real tips; the vue-router documentation is excellent.

If you're coming from Vue 1, the only thing that did confuse me is that the
router hooks have changed. The router now listens on `beforeRouteEnter` and
`beforeRouteLeave` and these hooks only get triggered once per route change.
Therefore, to listen to query changes on a route you need to watch the
`$route` object.

------
chinathrow
Are there any migration guides from jQuery to Vue which are noteworthy?

------
vbit
I have some projects in Mithril - is it worth it port to Vue?

~~~
brlewis
Speaking only for myself, I'm sticking with Mithril.

