Skip to content

Commit

Permalink
Add missing <details> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Feb 15, 2025
1 parent b9877a5 commit e2da4ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,8 @@ function render(virtualDomNode, sendToApp) {

</details>

<details>

<summary>Html.Keyed</summary>

`Html.Keyed` in the original elm/virtual-dom is pretty simplistic. I basically operates on a “one lookahead” principle. It goes through the children of the old and new virtual DOM node pairwise. If the keys match, diff them and move on. Otherwise, look ahead one child on both sides and compare all four virtual DOM nodes, to find insertions, removals and swaps. If nothing still matches, degrade to the naive method of moving every child in place (which can lead to moving 10 children up instead of 2 down, for example).
Expand Down

0 comments on commit e2da4ab

Please sign in to comment.