React matches old and new children by key — but only when the type also matches; a different type destroys and remakes the subtree regardless of key (the two "diffing rules" from this chapter). Write reconcileChildren(oldChildren, newChildren), where each child is { key, type }. A key present in both with the same type is reused. A key present in both with a different type is destroyed and remade — it counts as both removed and created. A key only in newChildren is created; a key only in oldChildren is removed. Return { reused, created, removed }, each an array of keys, following newChildren's order for reused/created, then any remaining removed keys in oldChildren's order.