In React, we use map function inside JSX to iterate on items.
Is it possible to have a Repeat component like *ngFor in Angular?
<Repeat for={[1, 2, 3]}>
...
<Repeat for={[5, 6, 7]}>
...
</Repeat>
</Repeat>
If yes, Is it possible to have some contextual properties inside each Repeat component?
$item: the item in the array.$index: the index of the item in the collection.$first: is true if the item is the first item in the array.$last: is true if the item is the last item in the array.
Is it possible to write such a component in React?