/// import { recipe, UI } from "commontools"; interface Item { id: number; name: string; } interface User { firstName: string; lastName: string; } interface State { items: Item[]; currentUser: User; } export default recipe("NestedProperty", (state) => { return { [UI]: (
{state.items.map((item) => (
{item.name} - edited by {state.currentUser.firstName} {state.currentUser.lastName}
))}
), }; });