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.
Example 1:
Input:
prev = [
{"id":"a","type":"text","props":{"value":"Hi"}},
{"id":"b","type":"button","props":{"label":"Ask"}}
]
next = [
{"id":"a","type":"text","props":{"value":"Hi"}},
{"id":"b","type":"button","props":{"label":"Search"}},
{"id":"c","type":"text","props":{"value":"New"}}
]
Output:
{"renderOrder":["a","b","c"],"updated":["b","c"]}
Explanation: a is unchanged, b changed props, and c is new.
Example 2:
Input:
prev = [{"id":"x","type":"card","props":{"title":"One"}}]
next = [{"id":"x","type":"modal","props":{"title":"One"}}]
Output:
{"renderOrder":["x"],"updated":["x"]}
Explanation: the same id changed component type, so it must be updated.
0 <= len(prev), len(next) <= 10^5id and typeid values in each input array are uniqueprops is a JSON-like object with primitive values or nested objects/arrays