How to close a IonItemSliding through React?

Hi! I’ve been trying to close a IonItemSliding through the React api but until now i haven’t got it working

      <IonItem routerLink={link}>
      <IonItemOptions side="end">
            onClick={event => {
            <IonIcon slot="start" icon={heart}></IonIcon>Favorite

When i click the option the code to add the favorites runs but i haven’t been able to access the sliding item.

I’ve tried:

But i can’t seem to find its reference


See this topic here: Ionic 4 + React: How Can I close an IonItemSliding?

I think that’s what you’re looking for.