I often see confusion around the need/impact of treating state as immutable...


I often see confusion around the need/impact of treating state as immutable in React.

Here's a little sandbox I created to show the impacts of mutating, shallow copies, and deep copies, with and without PureComponent: https://buff.ly/2qP2ndi

#react

View original on X