How to use normalizr's schema.Object with processStrategy
It looks like Object doesn't have processStrategy option like Entity
const deepNestedObj = new schema.Object({}, {
processStrategy: (value) => {
someExternalService(value);
return value;
}
})
const schema = new schema.Entity(...)
I would like to do something like this
Object does not use processStrategy. See options available in the docs.
If your object has a unique ID, the recommendation is to use
schema.Entityand its processing strategy.Alternatively, since it looks like maybe
deepNestedObjis something that's internal to yourschema.Entity, you can just use theprocessStrategyoption available on the Entity.