merkle-open / gondel

🚡 Gondel is a tiny library to bootstrap frontend components
https://gondel.js.org
MIT License
36 stars 10 forks source link

feat(react plugin): add async linkining support to the gondel react plugin #57

Closed jantimon closed 4 years ago

jantimon commented 4 years ago

This is a first untested draft to allow async react component linking:

before:

@Component('DemoWidget')
export class DemoWidget extends GondelReactComponent {
  start() {
      return import('./App').then((App) => this.App = App);
  }
}

now:

@Component('DemoWidget')
export class DemoWidget extends GondelReactComponent {
  App = import('./App')
}

The main advantage is that this will not block other Gondel components from executing their sync method

jantimon commented 4 years ago

I remove all changes unrelated to react (e.g. data plugin, events plugin or core)