-
Notifications
You must be signed in to change notification settings - Fork 20
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
Do things without an effects manager #46
Comments
|
@dustinfarris Right, why is that? What do we need to call through ports? I haven't looked through what the effects manager does just yet :) |
@valberg my bad — for some reason i had it in my head that this library was calling phoenix.js directly, but that is not the case. I skimmed the code really quick, it looks like elm-phoenix is operating as an effects manager in order to internalize its state, without requiring the user to wire up a model/update So things like this: Line 270 in 9a185c3
will need to be refactored into a bona fide update function. I don't think there will be any API changes as a result, just more initial work for the user to set things up. |
@dustinfarris Great! That sounds doable at least ;) |
Let me know if you need any planning/coding help, testing etc.. We are trying to figure out how to upgrade to 0.19 as soon as possible, to avoid future debt. Right now it seems we need to use ports no matter what, since there is no websocket package in 0.19. |
Hi again, Basically, I'm using a very simple web socket port driver. The setup is a bit verbose though, because you have to hook everything up just right. Perhaps this can be simplified. With support for web socket tasks, whatever that would look like, some things may be simplified, for instance, you won't have to provide a But the basic state machine is done. It has socket connection status, socket retry, heartbeat, and channel join status. The api model is the same as for saschatimme/elm-phoenix, you provide a list of channels to subscribe to based on the model. |
First of all: elm-phoenix is awesome! It's so easy to work with and the API just makes send - so kudos on that!
It would be very neat if it would become possible to install elm-phoenix using the normal
elm package
utility. This would mean that we did thinks without using an effects manager.I have little knowledge of how this should be done, but a discussion on the elm-lang discourse it is said that it should require "minimal modifications": https://discourse.elm-lang.org/t/elm-0-19-from-a-production-perspective/815/7
I'm going to see if I can figure out how this should be done, but any help is highly appreciated
The text was updated successfully, but these errors were encountered: