NgRx Data updateOneInCache change class to object

289 Views Asked by At

If I use updateOneInCache, then after that any class is converted to an object. With using removeOneFromCache and after addOneToCache this doesn't happen. How can I fix this when I use the updateOneInCache?

1

There are 1 best solutions below

0
On

You cannot fix this. One of the key concepts is that state should be stored serializable, a class instance is not serializable. See the redux styleguide for more info.