mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
edaf08fcfe
This implements the first step to proper child reconciliation. It doesn't yet track side-effects like insert/move/delete but has the main reconciliation algorithm in place. The goal of this algorithm is to branch early and avoid rechecking those conditions. That leads to some duplications of code. There are three major branches: - Reconciling a single child per type. - Reconciling all children that are in the same slot as before from the beginning. - Adding remaining children to a temporary Map and reconciling them by scanning the map. Even when we use the Map strategy we have to scan the linked list to line up "same slot" positions because React, unlike Inferno, can have implicit keys interleaved with explicit keys.