reactiveui/Sextant

feature: Add NavigateForResult

vjlomocso opened this issue ยท 3 comments

I want to have a reusable viewmodel that can emit results back to the calling viewmodel.

If we can get something like a NavigateForResult with a generic type then that would be neat. Interactions are great but I believe they are best for very simple dialogs and simple results. What about a complex object? What if it's prompted as a popup, but as a full page? Yes we can subscribe to events from the ViewModel before passing it through to Navigate.Execute() but that just returns a IRoutableViewModel object and will make the pipeline less neat :D

ChooseContacts = ReactiveCommand.CreateFromObservable(() =>
    HostScreen.Router.NavigateForResult.Execute(new ContactsResultViewModel())
        .Select(contacts => /* transform result */));

We can do it by making a generic IRoutableViewModel<TResult> so the routing commands can listen to it's result.

Hey @vjlomocso ๐Ÿ‘‹,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us.

https://opencollective.com/reactiveui

PS.: We offer priority support for all backers. Don't forget to add priority label when you start backing us ๐Ÿ˜„

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

Hey @vjlomocso ๐Ÿ‘‹,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us.

https://opencollective.com/reactiveui

PS.: We offer priority support for all backers. Don't forget to add priority label when you start backing us ๐Ÿ˜„

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

Sextant is where our navigation is going in the future. Thanks for the suggestion