DEV Community

Discussion on: Components vs Microfrontends. What is the difference?

Collapse
 
mari_beee_ profile image
༼ つ ͠° ͟ ͟ʖ ͡° ༽つ 5000 Bees

Iiiinteresting, do you have an example of how to package a microfrontend neatly? With components in vue.js for example I tend to try to make sure everything necessary is within the single vue.js component file. With a microfrontend having DB access as well, in the way my sites are currently set up at least, it would mean multiple files. For ex, in a vuex/vuejs microfrontend would you package both a component and a vuex store together and then store them in one spot on the target project under the specific feature's name??

Collapse
 
infoxicator profile image
Ruben Casas

It is very important to avoid accidental coupling and try to follow the single responsibility principle + the business domain that your microfrontend is serving. You should be able to deploy everything in your package independently without the need for anything else to be deployed for the functionality to work. Apart from that you can follow any project structure that your build system or framework requires. 👍