Dispatch action to middleware from Web Socket doesn't work

Viewed 13

I have a middleware to receive the actions from React Component. I fetch the data from REST API in the middleware and then dispatch to Reducer to store in the global state.

I do have a websocket, connected during the application loading. When I dispatch an action from onMessage to middleware, the REST API doesn't get triggered. However, the same work when the action is from Component.

0 Answers
Related