I had the exact same problem as in this question here. With this code:
set(state, action) {
const { id, value, field } = action.payload
const range = state.ranges.find(r => r.id === id)
range[field] = new Date(value) //action.payload.field can be either "start" or "end"
}
Answer to question above was to not put non-serializable values in state.
Does it mean I can't have an array of objects that look like this { id, start, end }
in my state? If that's the case (which I hope it is not) how do I store it?
If I can't store it otherwise do I need to just write immutable logic for such cases?