UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

17 lines (15 loc) 439 B
'use strict'; export function scrollTo(animatedRef, x, y, animated) { const element = animatedRef(); // This prevents crashes if ref has not been set yet if (element !== -1) { // By ScrollView we mean any scrollable component const scrollView = element; scrollView === null || scrollView === void 0 ? void 0 : scrollView.scrollTo({ x, y, animated }); } } //# sourceMappingURL=scrollTo.web.js.map