Skip to content

Render middleware to allow rendering orphaned trees outside of the mounted node. #863

@matt-gadd

Description

@matt-gadd

Enhancement
We currently use offscreen rendering quite a lot in @dojo/widgets to get things such as height of items to determine space for layout. To do this we require rendering things synchronously and not in the mounted tree. An example of that is here: https://github.com/dojo/widgets/blob/92812c620f5edd701af61abecab1deb11680752b/src/list/index.tsx#L254-L263. The problem with this approach is, because it is an isolated renderer, things that rely on a context, such as theme etc do not work within this and their is no way to share contexts across renderers (nor am I sure this should be possible). To solve this it would be nice if we could have a middleware that allowed us to render things outside the existing mount point and sync in the current renderer scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions