In terms setting up a Meteor + VueJS project, the following are the basics. I only added versions as a snapshot to show what worked for me. If using these as commands, please don’t include $ or anything behind the //.
$ meteor --version // 1.4.2.3
$ meteor create <project name>
$ cd <project name>
$ meteor remove blaze-html-templates // only if you won't want Blaze included
$ meteor add static-html
$ meteor add session // to keep your session variables like you have with Blaze
$ meteor add akryum:vue-component@0.8.1 // the main package you'll need for Meteor + VueJS integration
$ meteor npm install --save vue@^2.1.8 // VueJS
$ meteor npm install --save vuex@^2.1.1 // if you want to use the vuex on metal and not through a wrapper
$ meteor npm install --save vue-router@^2.1.1 // if you want to use the router on metal and not through a wrapper
$ meteor npm install --save vue-meteor-tracker@^2.1.1 // get that Meteor integration going
$ meteor npm install --save vuex-router-sync@^4.1.0 // to keep your vuex and router in sync
$ meteor npm install // make sure you have all your dependencies straight
Thanks for sharing @aadams, this is helpful and a start for a good tutorial of using Meteor with Vue.
I’m currently debating between React and Vue. React already has an official Meteor integration and a very large and active ecosystem, so I’m wondering what were your reasons to push for Vue instead of React? and do you think the current state of integration with Meteor is sufficient to start a production app?
From the Meteor point of view, main difference between React and Vue is that people who enjoy Blaze will find much more similarity in Vue than in React. This way it’s much easier to pick it up and a good choice for those who would prefer the things to stay Blaze-like, while still getting majority of React goodies.
Vue also lets you to be more free with the way you want to write your applications. You want single file components or separate templates? You can use both. You want JSX or Blaze-like templates? Sure, you can have it. You want Jade? Coffeescript? Everything is fine. The Typescript plugin is still on the Vue+Meteor roadmap but it’s easy to write Vue with Typescript too.
The missing part for Vue right now would be that the Vue+Meteor ecosystem is still very fresh. To be honest I have no idea how the React+Meteor community deals with Meteor-related packages. If they are view-independent, like let’s say Flow Router which can be used with any view layer as long as there’s a short plugin for it written, then it will be more or less easy to use them with Vue too. I see that as the optimal way for Meteor packages to be written like.
The ecosystem for Vue alone is growing fast and there are quite a lot of tutorials / plugins / UI libraries / ports etc. Surely not as big as for React, but enough to be fine with it.
The current state of integration… there are still some missing parts, but I’d say 90% of what you need is already there and it’s working very nicely. Akryum’s packages are a great piece of work and even if it’s still in beta, I’d have no worries with going into production with Vue+Meteor app right now.
Thanks for the input @gusto ! I personally enjoyed Blaze and recently I did POC with React however I found it’s a bit rigid relative to Blaze specifically the HTML need to be formatted to JSX syntax and everything is forced into components at a very early stage, it could be I was doing something wrong but for quick prototyping and MVPs it’s an overkill, a more incremental and flexible approach would be preferable. So I’ll give Vue a try but I just hope we get something more tested (or even official), detailed tutorial, and a larger ecosystem so we can proceed with more confidence.
@alawi, just to go https://www.youtube.com/channel/UCSJbGtTlrDami-tDGPUV9-w/videos and watch the vids. You’ll have almost everything you need to get vue up and running. The only missing part is of course the meteor part, where you’ll just subscribe to published functions and query mini-mongo, and make meteor calls for data – but like @gusto said, @akryum has good repo examples of doing just this.
Once I get a component up and running in the fashion I want, I’ll post it here for you to review and discuss.
IMO, I’d use VueJS over React – VueJS is faster, easier to learn and use, just as component based, more flexible, and in terms of libraries/packages has a React equivalent for almost everything.