Skip to content

Commit 3f9a584

Browse files
authored
fix(comp): Fix direct state assignment
2 parents c5e2482 + b342330 commit 3f9a584

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export abstract class BaseCachedImage<P extends CachedImageProps> extends Compon
201201
componentWillMount() {
202202
const {mutable} = this.props;
203203
const source = this.checkSource(this.props.source);
204-
this.state = { path: undefined };
204+
this.setState({ path: undefined });
205205
if (source.uri) {
206206
this.observe(source as CachedImageURISource, mutable === true);
207207
}

0 commit comments

Comments
 (0)