openwebf/webf

Add Hybrid Routing Support

Opened this issue · 0 comments

Should this be an RFC?

  • This is not a substantial change

Description

According to this RFC: openwebf/rfc#8

We have 6 differents steps to get this feature done:

  1. A customized router library: Fork vue-router for Vue users and react-router for React users.
  2. One WebF running environment that can support multiple WebF entries:
    1. The WebF running environment can be initialized by a WebFController instance before creating the WebF widget created.
    2. Multiple WebF entries should sharing the same WebFController.
    3. The new WebF entries should be named: WebF.RouterView.
  3. A new API in WebFController to register callbacks, triggering actual native/Flutter navigation actions when JavaScript router libraries start navigating to a new page.
  4. A new API in WebFController for obtaining all router configurations, allowing Dart/Flutter developers to synchronize these configurations with their existing router configs.
  5. A new built-in custom element provided to the customized router library, enabling the porting of render contents for each distinct router view.
  6. Behaviors when WebF.RouterView get disposed

Alternatives and Workarounds