Immutability Benefits

jwp

John Peters

Posted on November 19, 2019

Immutability Benefits

Please add to the conversation by writing a little bit about why you feel Immutability is such a good idea. Please!

I recently used an Angular component, whereby it contained a table of data, immutable data. I found out later that the only way to change any row being displayed was to make a copy of the row to be edited by the user, show it in another control, then to mutate the entire collection with the new value inserted once the user made the change.

In the past, we would just mutate the data and save it off to the data store. Never had issues with that in 25+ years.

I feel the work to get the immutable data to mutate was way more work than just changing the row that needed it.

💖 💪 🙅 🚩
jwp
John Peters

Posted on November 19, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

A hidden power tool for arrays in TS
functional A hidden power tool for arrays in TS

January 25, 2024

Chaining Failable Tasks
functional Chaining Failable Tasks

March 7, 2020

Immutability Benefits
functional Immutability Benefits

November 19, 2019