This package has been deprecated

Author message:

using @mixspa/core instead

@mixspa/app

0.4.2 • Public • Published

mixspa-app

mixspa-app is used to define a app that can be load in another spa.

Current Status:

NPM Version NPM Downloads Build Status

NPM

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.

Package Sidebar

Install

npm i @mixspa/app

Weekly Downloads

0

Version

0.4.2

License

MIT

Unpacked Size

9.71 kB

Total Files

7

Last publish

Collaborators

  • xqcao