Clone and then mutate approach in redux
问题 I've been reading stuff on redux for a while. And there is a strange thing for me. In most examples people give, all the copying logic is handled via reducers. I'm using typescript and want to adopt a more class-based approach. But maybe I'm missing something. Let's say I have a shopping Cart class. Along with cart reducer and cart actions. It looks the following way: export class Cart { private items:{[key:string]:number} = {}; constructor(items:{[key:string]:number} = {}) { Object.assign