I have the following state declaration:
constructor(props: any) {
super(props);
this.state = {
orders: []
};
}
where orders is an array of these Order structures:
interface Order {
symbol: string,
qty: number,
side: Side
}
I want to map over the orders array like so:
this.state.orders.map( ( {order}, index: number) => {
return <li key={index}>order.symbol order.qty</li>;
})
I am playing with parenthesis and curlys, cant get the syntax right, not quite sure what I am doing. My intent is "loop over the array of orders in the render method and display it"
Thank you very much