Hi folks 👋, I just installed the redux-persist in a project still in its early stages and I'm facing this error message in the console as first thing when the page loads. I haven't done much besides including the lib as is, and my reduce...
error: Anon-serializablevaluewasdetectedinanaction,inthepath:`register`.Value:ƒregister2(key){_pStore.dispatch({type:REGISTER,key});}Takealookatthelogicthatdispatchedthisaction:{type:'persist/PERSIST',register:ƒ,rehydrate:ƒ}(Seehttps://redux.js.org/faq/actions#why-should-type-be-a-stri...
error('Action contains non-serializable values:', action); // 可以选择抛出错误、记录日志或执行其他操作 } }; // 在Redux store中应用中间件 const store = createStore( rootReducer, applyMiddleware(serializableMiddleware) ); 4. 建议如何避免在未来出现此类错误 代码审查:在团队中实施代码审查流程,确保...