With Vue 2.0 - Why not use Vue.js as view layer? (Vue.js will support virtual DOM and jsx)

Anybody know how vue-router 2 compares with flow-router?

I am starting my first projects from scratch. No past projects to maintain.

Marc

Basic list of needed stuff for starting a Vue-js+meteor project+flow router+Simple schema?
(React is INPOV to ugly and complex. And one file per template is enough!)

  1. Do we really need webpack (for Vue components)?
    Of course Code splitting & on demand is a need to have soon or late,
    But for now, too complex and some say MDG works on a procedure (wait for it astraunauts!)

  2. What permission/role package can fit?

Bottom of the line: lots of boilerplate of disparate but mendatory packages for smooth start! (and risk, anyway to align with something else in soon future because MDG will catch up with something different or same but in an official fashion)

Not really needed any more since @akryum made great Vue integration packages.

If you use Vue you should use vue-router instead of flow-router.

Thanks Laurent, but beside official routing package from Vue, do you see any advandages using vue-router over flow-router? @akryum uses flow-router in his webpack bases example. And I like flow-router’s phylosophy and future server side rendering and fast render. But never used any router yet.

Any comparison on routed in a vue+meteor context appreciated.

vue-router is perfectly integrated to Vue: http://router.vuejs.org/en/route.html

Also <router-view> is a must if you want layouts with Vue. You can find an example here.

As always you should try both and make your own opinion, depending on your specific needs.

I would recommend vue-router (and it’s getting SSR with Vue 2.0).

1 Like

Is react apollo client compatible with vue.js, or are you just getting half the dead if using vue that is still not supported despite being superior to react as the author puts it.

@akryum I started playing with vue-apollo and I love it. Too bad Apollo does not have a stable API yet, I could not make their latest apollo-server work with your package. Note that there is now an “experimental” way for reactivity in Apollo.

1 Like

Initial Vue 2.x compatibility: #63

5 Likes

Vue-router 2.x integration available! (Server-side rendering soon.)

10 Likes

@akryum great news! Thanks for that :+1:

I was just trying to sort out the npm stuff to get to vue 2.x since my params weren’t working in blaze templates hoping that might naturally bump vue router to 2.x as well, but apparently there’s another package for that. What if vue 2.x isn’t compatible with vue router 1.x than it would entirely be “impossible” to update, without npm going fail or invalid (which it did for which reason I don’t know).

Now Vue is more trendy than React :wink: https://trends.google.com/trends/explore?date=2014-04-07%202017-05-07&q=vuejs%20%2B%20vue.js,reactjs%20%2B%20react.js

I haven’t read this whole thread, but there is a webpack package for Meteor.

Also, it isn’t difficult to make a outside-of-meteor webpack build with Vue, and have it simply output the bundle into the Meteor app’s directory. Then it will run on the Meteor client.

It’s really easy!

That being said, we still need some reactivity solution that can hook Meteor reactivity into a Vue component. This doesn’t rely on the build system, it can simply be a Vue plugin to load at runtime.

@trusktr You mean this? :grin:

2 Likes

Ah, that is too awesome!!!

That something is popular or brings happiness, or is used in production doesn’t at all mean that it is any good. There have been so many terrible programming ideas and languages that were popular…

React brought a fantastic idea to the world, but the execution is incredibly poor and now done much better by ‘copy-cats’ like Vue, Marko, Moon, etc (even Preact is doing a better job these days!). Just to give you an idea, it is bloated and slow (not to mention its syntax and code hacks are a joke):

Moon - 7kb
Mithril - 8kb
Vue - 25.86kb
React + React DOM - 43kb
Angular 2 - 111kb

Update performance (more is better):

Moon - 102 repaints/sec
Mithril - 95 repaints/sec
Angular 2 - 62 repaints/sec
Vue - 50 repaints/sec
React - 49 repaints/sec
Angular - 47 repaints/sec

Developers should think twice before using React, there are superior options out there. Blaze/Viewmodel being one of them.

But these don’t get picked because React has first-mover advantage and Facebook’s behind it. And as a result devs blindly start implementing React, because of logical reasoning like “there’s a huge number of very reputable companies using it…”.

So yes, when people start doing things without thinking, that’s what I call a hype.

5 Likes

Couldn’t agree more.

2 Likes

I have tried to develop a small app with Vue - was very skeptical at first, but so far I really like it.

It gets very clean and is definitely much better than React, at least in these 2 productivity aspects:

  1. Inline styles - when you draft a template for a component you may put some inline styles temporary until they lay down in a separate stylesheet… And those inline styles are perfectly processed by Vue and are real pain in React…
  2. Single file (.vue) code separation - clean visibility where there is the template, the code and the styles (try to quickly grasp that in a typical .jsx file)

It is yet to see on how it will work with Meteor reactive data, but the frontend componentization works like a charm… Big thanks to @akryum for popularizing Vue and preparing the meteor-related packages!

P.S. And of course React is a no-go by default because of the Patent clause.

2 Likes

Hi everyone, I’m starting work on a Meteor + Vue Guide in a GitBook that will be open source and be open to community additions/feedback. :raised_hands:

I’ve built and continuously am working on a Meteor + Vue App and so I feel that it would be helpful to the community to document some of the core steps/code involved.

The guide book will include Meteor + Vue packages :package: by @akryum, that he previously listed in this thread. I’ve been so happy with this combination and his packages, that I want to help get him more sponsorship on GiftHub.

I believe creating really easy to use docs for new Vue devs to try Meteor as a backend will be a long term benefit to both the Meteor and Vue communities. I also should be able to maintain an open source app that we can use for upgrades and testing. An ideal situation would also be to create YouTube video content to accompany the GitBook. It would be really cool if @stolinski wanted to make a series from the docs for his Level Up Tutorials, or to work with other video makers with larger YouTube audiences :rocket:

If you use these Meteor + Vue packages, please check the packages you’re using…

  • :package: vue-meteor-tracker (meteor tracker integration)
  • :package: akryum:vue-component (vue component files)
  • :package: akryum:vue-router2 (vue-router 2.x helpers)
  • :package: vue-apollo (apollo integration)
  • :package: vuejs:blaze-integration (integrate Vue and Blaze)
  • :package: vue-supply (use reactive data & automatic subscriptions in components and vuex store)
  • :package: akryum:vue-ssr (Server-Side Rendering)

0 voters

2 Likes