
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. Which is fancy talk for mistakenly modifying stuff you didn't want to change: In this case, imagine we're in a Profile form, user holds the current user information and we want to create an updated user object with the modified attributes. As you ca...