So, I was wondering how I should separate my components as some of them have lots of HTML and dynamic parts depending on user roles & other stuff.
Lets say we have manager and client. Which would you prefer?
1: Render different components for only manager or for only client, depending on their role. This would check once and render the appropriate component
2: Render a single component for all user roles. This would contain lots of conditional stuff (imagine with 4 different roles) and would have all the JS in one component.
I was thinking, maybe #1 would be better for less computation, cleaner HTML/CSS and smaller file sizes since it wouldn’t have all the JS for every user role. Thoughts?
Also I don’t quite get why we are using both NPM and Atmosphere packages.
My Meteor packages
- akryum:vue-component
- akryum:vue-router2
NPM packages
- vue
- vue-meteor-tracker
- vue-router
Is that necessary to have them in Meteor packages? If yes, what do they add? Wouldn’t it be the same thing to use from NPM? My guess is, it has something to do with reactivity but I’m not really sure.