Skip to content

Support a function that returns a lazily imported widget when creating WNodes #57

@agubler

Description

@agubler

Enhancement

In order to support automatic code splitting for higher order components such as Outlet, it would be useful to support a function that returns a promise of a widget when using w or perhaps an additional API (so not to unnecessarily expose the API to the end user).

Within WidgetBase this function would be registered against an id and added to the registry, the function would then be replaced by the id on subsequent renders and the rest of the processing would flow through the usual registry path.

Note: it would only be able to support functions that don't change across renders so the function could not be defined inline, such as () => imports('./mywidget')

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnextIssue/Pull Request for the next major version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions