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

feature: Add NavigateForResult #52

Open
ghost opened this issue Apr 7, 2019 · 3 comments
Open

feature: Add NavigateForResult #52

ghost opened this issue Apr 7, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 7, 2019

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.

@open-collective-bot
Copy link

open-collective-bot bot commented Apr 7, 2019

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!

@glennawatson glennawatson transferred this issue from reactiveui/ReactiveUI Apr 7, 2019
@open-collective-bot
Copy link

open-collective-bot bot commented Apr 7, 2019

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!

@glennawatson
Copy link
Contributor

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

@RLittlesII RLittlesII changed the title NavigateForResult feature: Add NavigateForResult Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants