Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

334
Views
throw new Error(INPUT_ERROR); Error: input is invalid type

here is my redux store code it gives the input type error or input invalid error but this error is coming in development mode not on production why it is so, i don't have any clue

import { createStore, applyMiddleware, combineReducers } from "redux";
import { composeWithDevTools } from "redux-devtools-extension";
import { persistStore, persistReducer } from "redux-persist";
import storage from "redux-persist/lib/storage";
import sessionStorage from "redux-persist/lib/storage/session";
import thunk from "redux-thunk";
import rootReducer from "./reducers";
import { createStateSyncMiddleware } from "redux-state-sync";

const SET_CLIENT_STATE = "SET_CLIENT_STATE";
const middlewares = [
thunk,
createStateSyncMiddleware({
    // blacklist: ["extras", "products"]
    whitelist: ["user"],
}),
];

const persistConfig = {
key: "root",
storage,
whitelist: ["user", "loggedInDoctor", "loggedInPatient"],
};

const sessionRedConfig = {
key: "referrer",
storage: sessionStorage,
};

const { referrer, ...otherReducer } = rootReducer;

const allReducers = combineReducers({
...otherReducer,
referrer: persistReducer(sessionRedConfig, referrer),
});

const persistedReducer = persistReducer(persistConfig, allReducers);

const makeConfiguredStore = (reducer, initialState) =>
createStore(
    reducer,
    initialState,
    composeWithDevTools(applyMiddleware(...middlewares))
);

export const makeStore = (initialState, { isServer, req, debug, storeKey }) => {
if (isServer) {
    initialState = initialState || { fromServer: "foo" };
    return makeConfiguredStore(allReducers, initialState);
} else {
    // we need it only on client side
    const store = makeConfiguredStore(persistedReducer, initialState);
    store.__persistor = persistStore(store); // Nasty hack
    return {
    ...store,
    store,
    };
}
};

export const setClientState = (clientState) => ({
type: SET_CLIENT_STATE,
payload: clientState,
});
almost 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!