Redux-persist merges reducer Times error

problem description

error message:

Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.

the environmental background of the problems and what methods you have tried

I put reducer with different functions under different folders, and then use redux-persist for data persistence. Will web projects be refreshed often, so I want to keep the data in store from being lost? however, merging reducer with combineReducers method is an error, and I don"t know why

related codes

/ / Please paste the code text below (do not replace the code with pictures)
reducer

import * as Pages from "./action-types";

let defaultValue = {
    user_name: "",
    user_id: ""
}

export default function UserInfo (state = defaultValue, action = {}) {
    switch (action.type) {
        case Pages.SAVEUSERINFO:
            return { ...state,
                ...{
                    user_name: action.data.data.username,
                    user_id: action.data.data.id
                }
            };
        default:
            return state;
    }
}

merge location

import {
    combineReducers,
} from "redux";
import UserInfo from "./Pages/reducers";
import SaveInfo from "./Layout/reducers";


const rootReducer = combineReducers({ 
    UserInfo,
    SaveInfo
});

export default rootReducer;

entry file

import {
    Provider
} from "react-redux";
import {
    createStore,
    applyMiddleware
} from "redux";
// Reducersreducer
import Reducers from "@/Reducers";
import thunk from "redux-thunk";
import {persistStore, persistCombineReducers} from "redux-persist";
import { PersistGate } from "redux-persist/es/integration/react";

import storage from "redux-persist/es/storage"
const config = {
    key: "root",
    storage,
};

function configureStore(){
    console.log(Reducers)
    let reducer = persistCombineReducers(config, Reducers);
    let store = createStore(reducer, applyMiddleware(thunk));
    let persistor = persistStore(store);
    return { persistor, store }
}
const render = Component => {
    const { persistor, store } = configureStore();
    ReactDOM.render(
        //redux
        <Provider store={store}>
            <PersistGate persistor={persistor}>
                <Component />
            </PersistGate>
        </Provider>,
        document.getElementById("app"),
    )
}

what result do you expect? What is the error message actually seen?

expect that no matter how you refresh the browser, the data in the previous store can be saved to refresh

.
Mar.29,2021

persistCombineReducers this method does not know whether I am using it incorrectly or has been abandoned by the authorities. You can complete the implementation by using the persistReducer method to merge config and reducer in the documentation

.
import { persistStore, persistReducer } from 'redux-persist';
const persistedReducer = persistReducer(persistConfig, Reducers)
function configureStore(){
    let store = createStore(persistedReducer, applyMiddleware(thunk));
    let persistor = persistStore(store);
    return { persistor, store }
}
const render = Component => {
    const { persistor, store } = configureStore();
    ReactDOM.render(
        //redux
        <Provider store={store}>
            <PersistGate persistor={persistor}>
                <Component />
            </PersistGate>
        </Provider>,
        document.getElementById('app'),
    )
}

if you have any specific problems, please let me know. Thank you very much


when inserting persist middleware in this way, the action in the source code will error: Cannot read property 'type' of undefined
what's going on? I wrote the overall store, right?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9ebbb-19fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9ebbb-19fd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?