Immutability with immer
Why immutability? When working on a React application that needs to handle state, one of the main pitfalls to watch out for is accidental mutations. This is fancy talk for mistakenly modifying stuff you didn’t want to change: let user = { name: "foo" }; let updated = user; updated.name...