Skip to content

v0.6.0

Choose a tag to compare

@willybrauner willybrauner released this 12 Mar 11:48
· 51 commits to main since this release

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.Header

Stack 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,
  }
)