While I relate to some of the irritations described here, it’s my understanding that the chief…
Aaron Lisman
201

Hi Aaron,

I wouldn’t say thats the main concern of immutable, it’s more to stop any changes to your reducer state by means other than actions, thus ensuring one way data flow.

To address your specific issue obviously you can emulate the Immutable.is() behaviour yourself in native JavaScript, or use a helper lib like lodash/ramda. Thismay yield less performance than the Immutable version, likely depending on how complex your property objects are.

Though generally in this situation I would question why my render cycle is running twice with two objects identical in value. Or why I have complex objects as a property that need to be double checked for actual change; I prefer simple types as component properties and generally keep making my components more granular until I achieve it.

If you’re not convinced by Immutable I would advise avoid it, and check out some of the infrastructure that @mark.erikson outlined below as alternative solutions

https://medium.com/@mark.erikson/good-writeup-ec03f8f29f12#.23j8uapsk

Like what you read? Give Alex Faunt a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.