/// import { recipe, UI } from "commontools"; const dynamicKey = "value" as const; interface Item { value: number; other: number; } interface State { items: Item[]; } export default recipe("MapDestructuredComputedAlias", (state) => { return { [UI]: ( {state.items.map(({ [dynamicKey]: val }) => ( {val} ))} ), }; });