From 515acdee3fbb197c746fc7d967d195699d04d153 Mon Sep 17 00:00:00 2001 From: Simon Auer Date: Sun, 24 Mar 2019 01:26:19 +0100 Subject: [PATCH 1/2] Fixed "setState on unmounted component" Although an unmount mechanism is implemented, we still get the "setState on unmounted component" error. We have managed to find the problem lying in a typo of the lifecycle method name. Instead of "componentWillUnMount" it should be "componentWillUnmount". With this, the error disappears. --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 98f728e..7a48e66 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -32,7 +32,7 @@ export class ProgressiveImage extends React.Component !this.unmounted && this.setState({ src: srcDataURI, blur: 0 })); } - componentWillUnMount() { + componentWillUnmount() { this.unmounted = true; } From 6155343d05aeccacd1300fc27c61f52350697986 Mon Sep 17 00:00:00 2001 From: William Candillon Date: Sun, 24 Mar 2019 09:03:41 +0100 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 663403b..7b648f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-progressive-image-loading", - "version": "3.0.3", + "version": "3.0.4", "description": "Progressively load images using a blur effect. Edit", "main": "build/index.js", "typings": "build/index.d.ts",