Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 26, 2020 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/eb4b8b51e817a68b1f54d45b3b264e2a to your computer and use it in GitHub Desktop.
Save velotiotech/eb4b8b51e817a68b1f54d45b3b264e2a to your computer and use it in GitHub Desktop.
Component Based MicroFrontends
// A virtual class from which all micro-frontends would extend
class MicroFrontend {
beforeMount() {
// do things before the micro front-end mounts
}
onChange() {
// do things when the attributes of a micro front-end changes
}
render() {
// html of the micro frontend
return '<div></div>';
}
onDismount() {
// do things after the micro front-end dismounts
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment