Effect CommunityEC
Effect Community3y ago
27 replies
timbotronic

Refactoring WebSocket Probe Function

Hey all, I'm refactoring some code and trying to Effecterize a simple websocket probe function.

The below is pretty boiletplate but essentially boils down to creating a websocket within a promise, and embedding your resolve/reject into the message handlers.


What would be the idiomatic effect pattern be?
Was this page helpful?