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

**Code:** `non-serializable value` · **Category:** React · **Seen on:** React

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/react/redux-non-serializable-value)
