Vue as the base of Blaze 2.0

To be a bit more on topic again, and more constructive.

I just finished porting Tracker to Vue’s observer. Vue has a similar concept to Meteor’s Tracker and it is so similar that mostly there is just API difference, while semantics are the same. I made a Tracker API wrapper around Vue’s observer. It is 100% compatible with Tracker. Now one can use all Meteor code directly in Vue and get all reactivity you were used in Blaze, with all benefits of Vue.

For now, it requires a forked version of Vue. Pull request is here. Please upvote it to show support.

More of my ideas of how I think Vue could be integrated with Meteor is here: https://github.com/Akryum/vue-meteor-tracker/issues/3

Feedback welcome. Help as well. I slightly remember that somebody already did a version of Minimongo which uses getters to register dependencies on Tracker, instead of having developers specify fields precisely to limit the reactivity. Does anyone remember that? Or maybe I was just pipe dreaming.

Blaze 2.0 could then be just a syntax preprocessor for Vue, similarly how Jade is already supported. Search for “jade” here. So one could do <template lang="blaze"></template>.

Example app: https://github.com/mitar/vue-test. Notice how I can use Meteor ReactiveVar inside computed value directly.

17 Likes