Vue.JS for a Micro Frontend approach Vue.JS for a Micro Frontend approach vue.js vue.js

Vue.JS for a Micro Frontend approach


Feasibility: Composite UI

  1. Is it possible to create a composite UI (micro front end) based on vue by using standard vue tools?

Yes, it is possible. Pretty much any independent Vue-component you see published around (vue-select, vue-slider-component and even full "sets" of components such as vuetify, bootstrap-vue or vue-material are examples of reusable (composable) components developed using standard Vue tools.

Page transistions: Routing

  1. We have more than one page, so we need a solution to navigate from one side to another. How can we realize page transitions?

vue-router is the tool for this job. It is developed by the core team, so expect tight integration and great feature support.

Event-Bus

  1. Is it possible to established a Event-Bus between the VueJS components?

Every Vue instance implements an events interface. This means that to communicate between two Vue instances or components you can use Custom Events. You can also use Vuex (see below).

Bidirectional communication

  1. How can we implement a bidirectional communication between the components?

The best way to send data from parent component to child is using props.Steps:

  1. Declare props (array or object) in the child
  2. Pass it to the child via <child :name="variableOnParent">.

See demo below: