Skip to content

Consider removing ViewEnvironment parameter from RenderWorkflowIn #1153

@rjrjr

Description

@rjrjr

Look at the anxious section at the end of the original Compose integration writeup. We mainly rationalized passing ViewEnvironment around because it was so fragile WRT ViewRegistry -- things would blow up if there was no ViewRegistry in ViewEnvironment, that kind of thing.

This is no longer the case. ViewRegistry is very much optional, and having a missing or empty one is just fine. And the manually passed ViewEnvironment has been a chronic optmization problem. Maybe we should undo that decision, and make ViewEnvironment just another Compose local.

val LocalWorkflowEnvironment = staticCompositionLocalOf<ViewEnvironment> {
    noLocalProvidedFor("LocalView")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions