Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing ViewEnvironment parameter from RenderWorkflowIn #1153

Open
rjrjr opened this issue Jan 9, 2024 · 0 comments
Open

Consider removing ViewEnvironment parameter from RenderWorkflowIn #1153

rjrjr opened this issue Jan 9, 2024 · 0 comments
Milestone

Comments

@rjrjr
Copy link
Contributor

rjrjr commented Jan 9, 2024

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")
}
@rjrjr rjrjr added this to the ui-1.0 milestone Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant