Skip to content

Commit 5998237

Browse files
authored
Merge pull request #29 from wcandillon/wcandillon-patch-19
fix(component): fix component lifecycle
2 parents 8771344 + 7a06ac8 commit 5998237

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ export class ProgressiveImage extends React.Component<ProgressiveImageProps, Pro
2222
initialBlur: 10
2323
};
2424

25-
constructor(props: ProgressiveImageProps) {
26-
super(props);
25+
componentWillMount() {
2726
const {src, preview} = this.props;
2827
const initialBlur = this.props.initialBlur as number;
2928
this.setState({ src: "", blur: initialBlur });

0 commit comments

Comments
 (0)