Open DL1CB opened 6 years ago
Yes that doesn't even at all, it needs to be this:
connection.socket.onmessage = function (data) {
store.dispatch(createMessageAction(endpoint, data))
}
connection.socket.onopen = function () {
store.dispatch(createConnectionAction(endpoint))
}
connection.socket.onclose = function () {
store.dispatch(createDisonnectionAction(endpoint))
}
connection.socket.onerror = function (error) {
store.dispatch(createErrorAction(endpoint, error))
}
Also, I don't understand these claims:
Was this a TODO? because the released version does not retry connection or do offline batching!
in src/index.js
connection does not have the function onmessage
should be someting like