{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/anatine/issues/42","repository_url":"https://api.github.com/repos/sindresorhus/anatine","labels_url":"https://api.github.com/repos/sindresorhus/anatine/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/anatine/issues/42/comments","events_url":"https://api.github.com/repos/sindresorhus/anatine/issues/42/events","html_url":"https://github.com/sindresorhus/anatine/pull/42","id":154828737,"number":42,"title":"Use clearInterval to wait for React before init","user":{"login":"paulmolluzzo","id":737065,"avatar_url":"https://avatars.githubusercontent.com/u/737065?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmolluzzo","html_url":"https://github.com/paulmolluzzo","followers_url":"https://api.github.com/users/paulmolluzzo/followers","following_url":"https://api.github.com/users/paulmolluzzo/following{/other_user}","gists_url":"https://api.github.com/users/paulmolluzzo/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmolluzzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmolluzzo/subscriptions","organizations_url":"https://api.github.com/users/paulmolluzzo/orgs","repos_url":"https://api.github.com/users/paulmolluzzo/repos","events_url":"https://api.github.com/users/paulmolluzzo/events{/privacy}","received_events_url":"https://api.github.com/users/paulmolluzzo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-14T02:05:33Z","updated_at":"2016-05-15T20:34:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sindresorhus/anatine/pulls/42","html_url":"https://github.com/sindresorhus/anatine/pull/42","diff_url":"https://github.com/sindresorhus/anatine/pull/42.diff","patch_url":"https://github.com/sindresorhus/anatine/pull/42.patch"},"body":"This is a super simple solution to waiting for React before firing the `init` function. Since the `init` only really depends on the `header` element, we're waiting on that to load into the DOM.\r\n\r\nThis fixes #15.\r\n\r\n// @sindresorhus   "},"comment":{"url":"https://api.github.com/repos/sindresorhus/anatine/issues/comments/219308952","html_url":"https://github.com/sindresorhus/anatine/pull/42#issuecomment-219308952","issue_url":"https://api.github.com/repos/sindresorhus/anatine/issues/42","id":219308952,"user":{"login":"paulmolluzzo","id":737065,"avatar_url":"https://avatars.githubusercontent.com/u/737065?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmolluzzo","html_url":"https://github.com/paulmolluzzo","followers_url":"https://api.github.com/users/paulmolluzzo/followers","following_url":"https://api.github.com/users/paulmolluzzo/following{/other_user}","gists_url":"https://api.github.com/users/paulmolluzzo/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmolluzzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmolluzzo/subscriptions","organizations_url":"https://api.github.com/users/paulmolluzzo/orgs","repos_url":"https://api.github.com/users/paulmolluzzo/repos","events_url":"https://api.github.com/users/paulmolluzzo/events{/privacy}","received_events_url":"https://api.github.com/users/paulmolluzzo/received_events","type":"User","site_admin":false},"created_at":"2016-05-15T20:34:30Z","updated_at":"2016-05-15T20:34:30Z","body":"> Weird, I'll do some tests tomorrow myself.\r\n\r\nI'll take a closer look too, but it might have been the double selecting. Technically we used to call the function inside the interval, now we resolve the Promise and then call the function, so we've at least added the promise resolution process in there. I don't know if creating the promise itself made a big impact.\r\n\r\nIf you run performance tests of any kind please update regardless. I'm interested in how to best test performance."}}