当我从String
take
时遇到错误。
websocket连接成功。我无法使用eventChannel
回调在eventChannel之外接收消息。 onmessage
redux-saga@0.5*
}
function createSocketChannel (socket){
return eventChannel(emit => {
socket.onmessage = msg => emit(msg);
return () => socket.close();
}, buffers.sliding(10));