score:0

const store = createStore(reducer, initialState);

// ... some code to initialize socket.io

socket.on('receiveAction', data => {
  store.dispatch({
    type: 'ACTION_TYPES',
    payload: data
  });
});

Related Query

More Query from same tag