From 092d488a7445b691ab61d337650a9f6e0ad09a04 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 20 Nov 2017 01:00:43 +0200 Subject: [PATCH] Fix setState run before mount --- src/components/StoreProvider.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/StoreProvider.ts b/src/components/StoreProvider.ts index 1fb616e3..bb69e274 100644 --- a/src/components/StoreProvider.ts +++ b/src/components/StoreProvider.ts @@ -25,7 +25,9 @@ export class StoreProvider extends Component { this.state = { loading: true, }; + } + componentDidMount() { this.load(); }