Files
react-native/packages/react-native-fantom
Samuel SuslaandFacebook GitHub Bot 65ffc588fb introduce convenience method Fantom.scrollTo (#50011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50011

changelog: [internal]

Majority of time, you want to simply scroll. This diff introduces a convenience method Fantom.scrollTo.

Previously, you would have to write:
```
  Fantom.runOnUIThread(() => {
    Fantom.enqueueScrollEvent(element, {
      x: 0,
      y: 60,
    });
  });
  Fantom.runWorkLoop();
```

Now, you can just do:
```
 Fantom.scrollTo(element, {
    x: 0,
    y: 60,
  });
```

Reviewed By: rubennorte

Differential Revision: D71113680

fbshipit-source-id: aed49a2f12be8ab30be549235cc7a2b3e35faadb
2025-03-13 07:42:32 -07:00
..