Skip to content

Commit 2277cfe

Browse files
authored
fix: define shouldUpdate function
1 parent f2776ab commit 2277cfe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Lifecycles/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class Lifecycles extends Component<ILifecyclesProps, {}> {
2626
}
2727

2828
shouldComponentUpdate (nextProps) {
29+
const fn = this.props.shouldUpdate;
2930
return fn ? Boolean(fn(nextProps, this.props)) : true;
3031
}
3132

0 commit comments

Comments
 (0)