Skip to content

Is the EnvironmentState experiment equivalent to Flutter's Provider package? #426

Closed Answered by JaggerJo
glen-nicol asked this question in Q&A
Discussion options

You must be logged in to vote

Hey Glen 👋

Yeah, the component model is quite nice.

I've never used Flutter, so I can't really compare FuncUI to it. The IComponentContext is used only within a component and basically holds it's state, ...

FuncUI Components are just regular Avalonia UI Controls. Avalonia places them in a hierarchy (Logical Tree, Visual Tree) that you can inspect.

The EnvironmentState uses that concept under the covers to share/pass state across components that are direct or indirect Childs of an Environment State Provider. Think of it as an implicit way to pass state down, or get state relative to the context a component is placed in.

It's experimental because the API might change and we did not get enou…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@glen-nicol
Comment options

@JaggerJo
Comment options

Answer selected by glen-nicol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants