@resourge/react-fetch
Version:
[](LICENSE)
21 lines (20 loc) • 764 B
TypeScript
/**
* react-fetch v1.43.1
*
* Copyright (c) resourge.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
import { type MutableRefObject } from 'react';
import { type NativeScrollEvent, type NativeSyntheticEvent } from 'react-native';
import { type ScrollPos } from './types';
export type ElementWithScrollTo = {
scrollToOffset: (params: {
offset: number;
animated?: boolean | null | undefined;
}) => void;
};
export declare const useOnScroll: <T extends ElementWithScrollTo | null>(scrollMethod: (position: ScrollPos) => void) => [ref: MutableRefObject<T | null>, onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void];