mixspa-app
mixspa-app is used to define a app that can be load in another spa.
Current Status:
How to use?
According the following to define a app. The name
& render
must exist.
import MixspaApp from '@mixspa/app';
MixspaApp.define({
tag: 'app-demo', /* This name will be used for tag name */
init: function(element) {
/* will be call when custom element has been created */
},
render: function(element) {
let attrName = element.getAttribute('data-name'); //
/* will be call after custom element has been rendered */
},
unmount: function(element) {
/* will be call when custom element has been removed */
},
update: function(element) {
/* will be call when attribute has been changed */
}
});
The MixspaApp will create a custom element for use.
About more details & the api of parameter element
please reference here:
CustomElement
License
mixspa-app is released under the MIT license.