Skip to content

Instantly share code, notes, and snippets.

View ahungrynoob's full-sized avatar
💡
Lighten the world.

DXD ahungrynoob

💡
Lighten the world.
View GitHub Profile
// Gist for https://medium.com/@ebakhtarov/bidirectional-websockets-with-redux-saga
import { eventChannel } from "redux-saga";
import { all, call, put, take, select, race } from "redux-saga/effects";
import { actionTypes } from "./constants";
function watchMessages(socket) {
return eventChannel(emit => {
/* eslint-disable no-param-reassign */