Skip to content

Commit bf71c05

Browse files
committed
rename nextProps to prevProps
1 parent 19ca584 commit bf71c05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ export default class InfiniteScroll extends Component<Props, State> {
139139
}
140140
}
141141

142-
componentDidUpdate(nextProps: Props) {
142+
componentDidUpdate(prevProps: Props) {
143143
// do nothing when dataLength is unchanged
144-
if (this.props.dataLength === nextProps.dataLength) return;
144+
if (this.props.dataLength === prevProps.dataLength) return;
145145

146146
this.actionTriggered = false;
147147
}

0 commit comments

Comments
 (0)