react-scrollsense
Version:
A lightweight scroll sensor to solve your react scroll into viewport issues.
34 lines (33 loc) • 2.13 kB
TypeScript
import React from "react";
declare function scrollConnectPropSingle(Component: React.ComponentType<any>): {
new (props: any): {
isRafAvailable: boolean;
isComplete: boolean;
onIntersection(el: any, fn: any): any;
componentDidMount(): void;
render(): JSX.Element;
context: any;
setState<K extends never>(state: ((prevState: null, props: Readonly<import("../types").ScrollConnectedComponentProps>) => Pick<null, K>) | Pick<null, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<import("../types").ScrollConnectedComponentProps> & Readonly<{
children?: React.ReactNode;
}>;
state: null;
refs: {
[key: string]: React.ReactInstance;
};
shouldComponentUpdate?(nextProps: Readonly<import("../types").ScrollConnectedComponentProps>, nextState: null, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<import("../types").ScrollConnectedComponentProps>, prevState: null): any;
componentDidUpdate?(prevProps: Readonly<import("../types").ScrollConnectedComponentProps>, prevState: null, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<import("../types").ScrollConnectedComponentProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("../types").ScrollConnectedComponentProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<import("../types").ScrollConnectedComponentProps>, nextState: null, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("../types").ScrollConnectedComponentProps>, nextState: null, nextContext: any): void;
};
contextType: React.Context<import("./types").IOScrollContext>;
};
export default scrollConnectPropSingle;