-
Notifications
You must be signed in to change notification settings - Fork 27
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
Websockets integration #1
Comments
You can try with Rx.DOM.fromWebSocket or just create your own observable and call |
Hey Michal. I think Rx.DOM.fromWebSocket is not necessary with phoenix as there is already abstraction on websockets done by phoenix. I have done the following:
I think it's quite clean. What are your thought? |
Sure, you could even create separare observable for each event so you don't need to check types so data flow is more declarative. You can use |
You mean separate action for each event? |
Or it should be done inside |
You have already separate action for each event :) Separate observable. Instead of calling
Types are not bad though. Pick what suits you best. |
Thanks, subjects are great, will use it! |
Hi. In your post you have mentioned how you would tackle working with ajax calls. However I was wondering how would you work with websockets.
I was trying to reimplement phoenix-trello, which was written in react/redux/phoenix with rxjs and decided to try your approach. However I cannot figure it out by myself. For instance how would you go about rewriting this code
The text was updated successfully, but these errors were encountered: