General update pattern
The example demonstrates the D3 general update pattern, animating a row of fruit circles as apples are added, removed, and replaced with lemons over time. It uses d3.select and d3.range to manage data, and the fruitBowl module applies enter, merge, and exit selections with transition.attr to animate circle radius and fill color. Rendering occurs in SVG via a React-free vanilla JavaScript setup, with d3.scaleOrdinal mapping fruit types to colors and sizes. The data consists of a mutable array of fruit objects, each with a random id for keying.