Great and simple tutorial! Love the logic explanation you made for each steps. I’m coming from Java so these algorithm is pretty new to me in terms of performance and implementation.
So, did React only updates the added entry due to the way we bind key index to each list items so that the DOM has the ability to acknowledge changes?
Is that so, later on when we have many components running in the same process, will JS going to be leaking memory due to all those disposed array like in any other immutable object language like Java or PHP? (When I was doing Java, re-assigning array in the variables using class loader without clearing its value could cause said issue pretty easily if you’re not careful.)