export interface **UpdateStr**<T> {
**id**: string; // need to update by name
changes: Partial<T>;
}
I need to update by name, instead of id
export interface **UpdateStr**<T> {
**id**: string; // need to update by name
changes: Partial<T>;
}
I need to update by name, instead of id
Entity is built around having an id
.
Either update manually, or use adapter.map
.
return adapter.map(
(entity) =>
entity.name === action.name
? updatedEntity // update entity with based on name
: entity // return the entity
state
);