Basics: Component building in Meteor + VueJS

Is anyone using Stylus / PostCSS plugins successfully inside their Vue components (.vue files) ?

using plugins such as Lost, Rupture, Rucksack, etc… working great on my .styl files, but I want them to work inside my Vue components…

Has anyone got this working?

thx

Thanks a lot, I didn’t think of that. That indeed looks like a great idea. The Minimongo directly in Vuex approach is in fact incredible with how clean it makes the components.

But I’m not sure if it’s the right place for subscription. This way, I imagine that even if we don’t use these data in our component, all the subscriptions of whole application are still alive and kicking (and wasting resources).

That’s why, in case this is true, I’d rather do operations on Minimongo in actions, but keep subscriptions at a component level, so that they get destroyed once the component is gone.

As for Stylus plugins, never tried.

1 Like

I’m trying as a general rule to handle all relationships to server/db api in my actions… it just makes more sense to me and easier to understand the flow of the data… Though I’m not completely sure it’s the most efficient way…

In the Meteor docs, it seems running subscribe inside Tracker.autorun is supposed to be smartly optimized within Meteor @ https://docs.meteor.com/api/pubsub.html#Meteor-subscribe : last paragraph

2 Likes