framework icon indicating copy to clipboard operation
framework copied to clipboard

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

Open matt-gadd opened this issue 5 years ago • 0 comments

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.

matt-gadd avatar Nov 25 '20 14:11 matt-gadd