{"action":"created","issue":{"url":"https://api.github.com/repos/milworm/react-progress-2/issues/2","repository_url":"https://api.github.com/repos/milworm/react-progress-2","labels_url":"https://api.github.com/repos/milworm/react-progress-2/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/milworm/react-progress-2/issues/2/comments","events_url":"https://api.github.com/repos/milworm/react-progress-2/issues/2/events","html_url":"https://github.com/milworm/react-progress-2/issues/2","id":134376393,"number":2,"title":"Getting `show of undefined` error when using in componentWillMount()","user":{"login":"austinmao","id":6487975,"avatar_url":"https://avatars.githubusercontent.com/u/6487975?v=3","gravatar_id":"","url":"https://api.github.com/users/austinmao","html_url":"https://github.com/austinmao","followers_url":"https://api.github.com/users/austinmao/followers","following_url":"https://api.github.com/users/austinmao/following{/other_user}","gists_url":"https://api.github.com/users/austinmao/gists{/gist_id}","starred_url":"https://api.github.com/users/austinmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinmao/subscriptions","organizations_url":"https://api.github.com/users/austinmao/orgs","repos_url":"https://api.github.com/users/austinmao/repos","events_url":"https://api.github.com/users/austinmao/events{/privacy}","received_events_url":"https://api.github.com/users/austinmao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-17T19:28:08Z","updated_at":"2016-02-18T02:34:30Z","closed_at":null,"body":"I want to use this as an indicator async loading indicator to indicate async route transitions. I have tried this below but it doesn't work because the component is not yet defined:\r\n\r\n```\r\n      componentWillMount() {\r\n        if (!shouldNotShowProgressBar) {\r\n          console.log('loading', api);\r\n          Progress.show();\r\n        }\r\n      }\r\n\r\n      componentDidMount() {\r\n        if (!shouldNotShowProgressBar) {\r\n          console.log('loaded', api);\r\n          Progress.hide();\r\n        }\r\n      }\r\n```\r\n\r\nDo you have a working example of this?"},"comment":{"url":"https://api.github.com/repos/milworm/react-progress-2/issues/comments/185514472","html_url":"https://github.com/milworm/react-progress-2/issues/2#issuecomment-185514472","issue_url":"https://api.github.com/repos/milworm/react-progress-2/issues/2","id":185514472,"user":{"login":"milworm","id":703674,"avatar_url":"https://avatars.githubusercontent.com/u/703674?v=3","gravatar_id":"","url":"https://api.github.com/users/milworm","html_url":"https://github.com/milworm","followers_url":"https://api.github.com/users/milworm/followers","following_url":"https://api.github.com/users/milworm/following{/other_user}","gists_url":"https://api.github.com/users/milworm/gists{/gist_id}","starred_url":"https://api.github.com/users/milworm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milworm/subscriptions","organizations_url":"https://api.github.com/users/milworm/orgs","repos_url":"https://api.github.com/users/milworm/repos","events_url":"https://api.github.com/users/milworm/events{/privacy}","received_events_url":"https://api.github.com/users/milworm/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T02:34:30Z","updated_at":"2016-02-18T02:34:30Z","body":"Well, but who loads the data? is it App-class, or it's before App is mounted?"}}