-
Notifications
You must be signed in to change notification settings - Fork 19
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
Using with Elmish.WPF #15
Comments
Hi, I will check out the possibility of releasing the separate Elmish.Reaction NuGet. Where can I find a sample Elmish.WPF app to play with? |
This is the kind of stuff I was trying to do: I managed to get it working via "|> Program.withSubscription rxSubcription", but I don't know if that's really the best/right way to do it. Currently I am experimenting with Fabulous, but I am still very much interested in the best way to do Rx. |
Been busy, but I have some plans for this during the next week |
+1 for using Elmish.Streams with Elmish.WPF. It looked like it was possible, but then looking at the examples/samples, unfortunately it looks it was created with Fable only in mind. |
I am also interested in using Elmish.Stream with Elmish.WPF.
Clone the Elmish.WPF repo and look at the projects in the |
Project renamed back to Fable.Reaction and is now using React hooks instead of stitching itself into the Elmish event loop. Not sure if there is anything similar to Hooks in WPF, but I'm afraid that this will make it harder to integrate with WPF. The preview Elmish.Streams have been moved to a separate branch for now. |
It seems like you're leaning toward tighter integration with Fable (given the name change) but as there's a few projects out there now using Elmish but not Fable, might you have any appetite for considering a separation of Reaction from Fable? I am not familiar with this codebase, so maybe it's easy enough just to reintegrate your AsyncRx with whichever flavour of Elmish one is using. Edit: Or could you speak more about why you switched to using React hooks instead of using the Elmish event loop? (So I don't make the same mistake if I try to use AsyncRx with https://github.com/fsbolero/Bolero |
Elmish does not support or even want extensions like this. Thus it was a "hack" that got increasingly harder to maintain with the fear of the loopholes being used getting changed or closed. As a React component we live our own life (event loop) together with Elmish, Feliz or on our own. I think I will move AsyncRx to it's own repo soon to make it easier to do tagged releases with GitHub Actions. Feel free to use Asyncx with Bolero. I would however consider using the same strategy there, i.e see if it's possible to make a Reaction Razor/Bolero Component that is separate from Elmish, but find a way to communicate e.g dispatch messages back into the Elmish event loop, and with React we use props the other way. |
That's a very good insight, thank you for sharing. I've added AsyncRx to my project, I'll see if I can use a similar pattern to what you've done here. |
First off, this looks like a very nice project, complete with documentation and examples!
For my question, I would like to incorporate the use of Rx observables in an Elmish.WPF app. Can I achieve this by using Elmish.Reaction? Also, are you going to put Elmish.Reaction on NuGet?
The text was updated successfully, but these errors were encountered: