Skip to content

Instantly share code, notes, and snippets.

@praveen001
Created July 22, 2019 11:14
Show Gist options
  • Save praveen001/ca43795f4489276f7f05dfebf83ae0eb to your computer and use it in GitHub Desktop.
Save praveen001/ca43795f4489276f7f05dfebf83ae0eb to your computer and use it in GitHub Desktop.
Redux Observable WebSocket
// Detect successfull connection by listening to onOpenSubject
const connectedEpic = action$ =>
action$.ofType(WebsocketActionTypes.CONNECT).switchMap(() =>
onOpenSubject.map(() => {
return connected();
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment