adospace / reactorui-maui

MauiReactor is a MVU UI framework built on top of .NET MAUI
MIT License
555 stars 46 forks source link

State action callbacks #183

Closed adospace closed 7 months ago

adospace commented 7 months ago

This PR adds the ability to register state callback functions inside item templates.

For example:

public override VisualNode Render()
{
    return new ContentPage
    {
        new CollectionView()
            .ItemsSource(State.Persons, RenderItem)
    };
}

private VisualNode RenderItem(IndexedPersonWithAddress item)
{
    return new Border()
    .ScaleX(() =>...use state)
    ;
}