@@ -19,17 +19,17 @@ import {
19
19
cancelAnimationFrame ,
20
20
} from './utils' ;
21
21
22
- export interface IChildProps {
22
+ interface ChildProps {
23
23
scroll : Scroll | null ;
24
24
dimensions : Dimensions | null ;
25
25
}
26
26
27
- interface IState extends IChildProps { }
27
+ interface State extends ChildProps { }
28
28
29
- interface IProps {
30
- children ?: ( props : IChildProps ) => React . ReactNode ;
31
- onUpdate ?: ( props : IChildProps , layoutSnapshot : unknown ) => void ;
32
- recalculateLayoutBeforeUpdate ?: ( props : IChildProps ) => unknown ;
29
+ interface Props {
30
+ children ?: ( props : ChildProps ) => React . ReactNode ;
31
+ onUpdate ?: ( props : ChildProps , layoutSnapshot : unknown ) => void ;
32
+ recalculateLayoutBeforeUpdate ?: ( props : ChildProps ) => unknown ;
33
33
disableScrollUpdates : boolean ;
34
34
disableDimensionsUpdates : boolean ;
35
35
deferUpdateUntilIdle : boolean ;
@@ -48,7 +48,7 @@ interface Context {
48
48
version : string ;
49
49
}
50
50
51
- export default class ObserveViewport extends React . Component < IProps , IState > {
51
+ export default class ObserveViewport extends React . Component < Props , State > {
52
52
private removeViewportChangeListener ?: (
53
53
handler : ViewportChangeHandler ,
54
54
) => void ;
@@ -59,22 +59,22 @@ export default class ObserveViewport extends React.Component<IProps, IState> {
59
59
private tickId ?: number ;
60
60
private nextViewport ?: Viewport ;
61
61
62
- static defaultProps : IProps = {
62
+ static defaultProps : Props = {
63
63
disableScrollUpdates : false ,
64
64
disableDimensionsUpdates : false ,
65
65
deferUpdateUntilIdle : false ,
66
66
priority : 'normal' ,
67
67
} ;
68
68
69
- constructor ( props : IProps ) {
69
+ constructor ( props : Props ) {
70
70
super ( props ) ;
71
71
this . state = {
72
72
scroll : createEmptyScrollState ( ) ,
73
73
dimensions : createEmptyDimensionState ( ) ,
74
74
} ;
75
75
}
76
76
77
- componentDidUpdate ( prevProps : IProps ) {
77
+ componentDidUpdate ( prevProps : Props ) {
78
78
const dimensionsBecameActive =
79
79
! this . props . disableDimensionsUpdates &&
80
80
prevProps . disableDimensionsUpdates ;
0 commit comments