non-serializable value ⚛️ React

A non-serializable value was detected in the state / in an action, in the path

Redux Toolkit’s middleware found a Date, Promise, class instance or function in state or an action.

Seen on: React

Meaning

Redux state should be plain serializable data so devtools, persistence and time-travel work. Common: Date objects, Error objects, Maps, File objects, or redux-persist actions.

Common causes

  • Storing Date/Map/Set/class instances in state
  • Passing events or Files in action payloads
  • redux-persist actions (needs ignoredActions)

⚡ Quick fix

  1. Store ISO strings/timestamps instead of Date
  2. Keep non-serializable data outside Redux
  3. Configure serializableCheck.ignoredActions for redux-persist

Detailed fix by platform

React

  1. getDefaultMiddleware({ serializableCheck: { ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER] } })

How to diagnose

  1. Path — Which path is named?
  2. Value — What type is it?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.