{"action":"opened","issue":{"url":"https://api.github.com/repos/mironov/react-redux-loading-bar/issues/10","repository_url":"https://api.github.com/repos/mironov/react-redux-loading-bar","labels_url":"https://api.github.com/repos/mironov/react-redux-loading-bar/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/mironov/react-redux-loading-bar/issues/10/comments","events_url":"https://api.github.com/repos/mironov/react-redux-loading-bar/issues/10/events","html_url":"https://github.com/mironov/react-redux-loading-bar/issues/10","id":174483384,"number":10,"title":"Unallocated progressInterval handler","user":{"login":"florin314","id":7572745,"avatar_url":"https://avatars.githubusercontent.com/u/7572745?v=3","gravatar_id":"","url":"https://api.github.com/users/florin314","html_url":"https://github.com/florin314","followers_url":"https://api.github.com/users/florin314/followers","following_url":"https://api.github.com/users/florin314/following{/other_user}","gists_url":"https://api.github.com/users/florin314/gists{/gist_id}","starred_url":"https://api.github.com/users/florin314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florin314/subscriptions","organizations_url":"https://api.github.com/users/florin314/orgs","repos_url":"https://api.github.com/users/florin314/repos","events_url":"https://api.github.com/users/florin314/events{/privacy}","received_events_url":"https://api.github.com/users/florin314/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T09:58:42Z","updated_at":"2016-09-01T09:58:42Z","closed_at":null,"body":"I basically perform the actions bellow:\r\n\r\n1) dispatch(showLoading())\r\n2) dispatch(hideLoading())\r\n3) dispatch(showLoading())\r\n4) dispatch(hideLoading())\r\n.....\r\nSometimes the error bellow pops up in an infinite loop:\r\nwindow.console.error \r\n@ VM54:27printWarning \r\n@ warning.js:36warning \r\n@ warning.js:60\r\ngetInternalInstanceReadyForUpdate \r\n@ ReactUpdateQueue.js:48enqueueSetState \r\n@ ReactUpdateQueue.js:200ReactComponent.setState \r\n@ ReactComponent.js:64resetProgress \r\n@ loading_bar.js:104\r\n\r\nI think that the resetProgress() from the 2) dispatch gets called after launch() function from 3) dispatch which overrides this.state.progressInterval.\r\n\r\nA workaround/fix I did was to modify   resetProgress:\r\nresetProgress() {\r\nif (this.state.progressInterval) {    \r\n  clearInterval(this.state.progressInterval);      \r\n}\r\nthis.setState(initialState);   \r\n}"}}
{"actor":{"display_login":"florin314"}}