Velo by Wix: Event Handling of a Repeater Item

At first sight, adding event handling for repeated items looks easy. You just handling events of repeated items inside Repeater loop methods there you have all needed data and scope with selector $item().

JavaScript
 




x
12


 
1
$w("#repeater").onItemReady(($itemitemDataindex=> {
2
  // it look easy
3
  $item("#repeatedButton").onClick((event) => {
4
    // we have all we need
5
    console.log(
6
      $item("#repeatedContainer"),
7
      itemData,
8
      index,
9
    );
10
  });
11
});
12

          



What's wrong with this approach?