Your question is Type-Safe Dynamic List Renderer. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Implement a function that powers a dynamic UI list renderer. Given an array of component descriptors, where each descriptor has a stable id, a type, and a props object, return a render plan that reuses previously rendered components when both type and props are unchanged. The function should output the ordered list of component ids to render and the subset of ids that must be updated.
id and typeid values in each input array are uniqueprops is a JSON-like object with primitive values or nested objects/arraysdef diff_render_plan(prev, next):