v0.6.0
Breaking changes
fix #15
fix Instance order
The component order instance is inverted, the deepest in the tree is instantiated first:
- AboutPage
- Header (child of AboutPage)
- MainButton (child of Header)
The console result:
MainButton mounted
Header mounted
AboutPage mounted
We need to respect the tree order as below:
AboutPage mounted
Header mounted
MainButton mounted
To solve this, all children components need to be return from a method and executed just before the mounted() method.
components = {} object as been replaced by addComponents() function, returning children components objects.
public addComponents = () => ({
Header: this.add(Header),
MainButton: this.add<MainButton[]>(MainButton),
})
// ... then
this.components.HeaderStack pages() become addPages()
In order to get the same naming than in Components, pages() function used to register Pages components in Stack has been rename addPages().
public addPages () {
return {
HomePage,
AboutPage,
WorkPage,
}
)