The Winter Throat

I like to occasionally write articles about things that pique my interest at work, or opinions that I form over the years.
Immutability with Immer

Immutability with Immer

🇺🇸 englishPublished December 2018 (at 28)#react1279 words4 mn to read

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...

The Winter Throat

Blog

Back

I like to occasionally write articles about things that pique my interest at work, or opinions that I form over the years.
Immutability with Immer

Immutability with Immer

🇺🇸 englishPublished December 2018 (at 28)#react1279 words4 mn to read

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...