Fork me on GitHub
#re-frame
<
2021-11-29
>
Noah Bogart16:11:34

i have a turn-based game app that uses web sockets to send actions to and receive updates from the server. i’m considering moving the architecture (which is currently a mess of cljs/atoms and r/atoms across many namespaces) to re-frame to help achieve some semblance of order amidst the chaos

Noah Bogart17:11:15

should I be putiting the ws-message-send! calls in re-frame dispatch functions? or should I just call it as a side-effect and then (somehow) have the ws-message-handler! receiver function update app-db and let the changes propagate through?

p-himik17:11:02

All side effects should be done in effect handlers. When new data arrives, you can simply dispatch it.

👍 1