magarcia / todomvc-redux-starter-kit

TodoMVC using Redux Starter Kit
https://magarcia.github.io/2019/01/26/todomvc-redux-starter-kit/
11 stars 7 forks source link

A non-serializable value was detected in an action, in the path: `payload`. Value: #1

Open mingliao opened 5 years ago

mingliao commented 5 years ago

thank u for the example of "todomvc" ^_^

i run with this app and click the select all icon ,and console show me show warning , and i don't know how to fix the problem. image

A non-serializable value was detected in an action, in the path: payload. Value: Take a look at the logic that dispatched this action: {type: "todos/completeAll", payload: Class}. (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants) console.(anonymous function) @ index.js:1446 (anonymous) @ redux-starter-kit.esm.js:161 (anonymous) @ index.js:11 (anonymous) @ index.js:53 dispatch @ VM420:1 (anonymous) @ bindActionCreators.js:3 callCallback @ react-dom.development.js:147 invokeGuardedCallbackDev @ react-dom.development.js:196 invokeGuardedCallback @ react-dom.development.js:250 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:265 executeDispatch @ react-dom.development.js:571 executeDispatchesInOrder @ react-dom.development.js:596 executeDispatchesAndRelease @ react-dom.development.js:695 executeDispatchesAndReleaseTopLevel @ react-dom.development.js:704 forEachAccumulated @ react-dom.development.js:676 runEventsInBatch @ react-dom.development.js:844 runExtractedEventsInBatch @ react-dom.development.js:852 handleTopLevel @ react-dom.development.js:5030 batchedUpdates$1 @ react-dom.development.js:21469 batchedUpdates @ react-dom.development.js:2247 dispatchEvent @ react-dom.development.js:5110 (anonymous) @ react-dom.development.js:21526 unstable_runWithPriority @ scheduler.development.js:255 interactiveUpdates$1 @ react-dom.development.js:21525 interactiveUpdates @ react-dom.development.js:2268 dispatchInteractiveEvent @ react-dom.development.js:5086

how to fix this warning thank u

remjx commented 5 years ago

console log the payload and see what it's saying is unserializable?