✏️Editing socket client config
This commit is contained in:
@@ -3,17 +3,22 @@ import { createStore, applyMiddleware, compose } from "redux";
|
|||||||
import { createBrowserHistory } from "history";
|
import { createBrowserHistory } from "history";
|
||||||
import thunk from "redux-thunk";
|
import thunk from "redux-thunk";
|
||||||
import createRootReducer from "../reducers";
|
import createRootReducer from "../reducers";
|
||||||
import socketIO from "socket.io-client";
|
import { io } from "socket.io-client";
|
||||||
import socketIoMiddleware from "redux-socket.io-middleware";
|
import socketIoMiddleware from "redux-socket.io-middleware";
|
||||||
// import { SOCKET_BASE_URI } from "../constants/endpoints";
|
// import { SOCKET_BASE_URI } from "../constants/endpoints";
|
||||||
const io = socketIO(`http://rook:3001`);
|
// const socketConnection = io(`http://rook:3001`);
|
||||||
|
|
||||||
export const history = createBrowserHistory();
|
export const history = createBrowserHistory();
|
||||||
const configureStore = (initialState) => {
|
const configureStore = (initialState) => {
|
||||||
const store = createStore(
|
const store = createStore(
|
||||||
createRootReducer(history),
|
createRootReducer(history),
|
||||||
initialState,
|
initialState,
|
||||||
compose(
|
compose(
|
||||||
applyMiddleware(socketIoMiddleware(io), thunk, routerMiddleware(history)),
|
applyMiddleware(
|
||||||
|
// socketIoMiddleware(socketConnection),
|
||||||
|
thunk,
|
||||||
|
routerMiddleware(history),
|
||||||
|
),
|
||||||
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
|
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user