{"action":"created","issue":{"url":"https://api.github.com/repos/mpowaga/react-slider/issues/15","labels_url":"https://api.github.com/repos/mpowaga/react-slider/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/mpowaga/react-slider/issues/15/comments","events_url":"https://api.github.com/repos/mpowaga/react-slider/issues/15/events","html_url":"https://github.com/mpowaga/react-slider/issues/15","id":54002161,"number":15,"title":"Cannot figure out slider size if component is hidden","user":{"login":"dustinwtf","id":1725226,"avatar_url":"https://avatars.githubusercontent.com/u/1725226?v=3","gravatar_id":"","url":"https://api.github.com/users/dustinwtf","html_url":"https://github.com/dustinwtf","followers_url":"https://api.github.com/users/dustinwtf/followers","following_url":"https://api.github.com/users/dustinwtf/following{/other_user}","gists_url":"https://api.github.com/users/dustinwtf/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinwtf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinwtf/subscriptions","organizations_url":"https://api.github.com/users/dustinwtf/orgs","repos_url":"https://api.github.com/users/dustinwtf/repos","events_url":"https://api.github.com/users/dustinwtf/events{/privacy}","received_events_url":"https://api.github.com/users/dustinwtf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-11T19:41:42Z","updated_at":"2015-05-13T18:26:05Z","closed_at":null,"body":"I have a component that is hidden on initial load, so on your `componentDidMount` you are calling `_handleResize` and that runs `getBoundingClientRect` and it returns all zeros.\r\n\r\nRight now, I am calling the `_handleResize` function as a work around when my component is visible. Is there something better I can do?"},"comment":{"url":"https://api.github.com/repos/mpowaga/react-slider/issues/comments/101767935","html_url":"https://github.com/mpowaga/react-slider/issues/15#issuecomment-101767935","issue_url":"https://api.github.com/repos/mpowaga/react-slider/issues/15","id":101767935,"user":{"login":"ccitro","id":2053557,"avatar_url":"https://avatars.githubusercontent.com/u/2053557?v=3","gravatar_id":"","url":"https://api.github.com/users/ccitro","html_url":"https://github.com/ccitro","followers_url":"https://api.github.com/users/ccitro/followers","following_url":"https://api.github.com/users/ccitro/following{/other_user}","gists_url":"https://api.github.com/users/ccitro/gists{/gist_id}","starred_url":"https://api.github.com/users/ccitro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccitro/subscriptions","organizations_url":"https://api.github.com/users/ccitro/orgs","repos_url":"https://api.github.com/users/ccitro/repos","events_url":"https://api.github.com/users/ccitro/events{/privacy}","received_events_url":"https://api.github.com/users/ccitro/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T18:26:05Z","updated_at":"2015-05-13T18:26:05Z","body":"I ran into this issue myself, and I submitted a pull request for how I've solved it for my use cases.\r\n\r\nFor me, checking if upperBound is 0 in componentWillReceiveProps works because my props will always change after the slider becomes visible.  It won't fix all cases, but it doesn't add any overhead and fixes it as long as your props change.\r\n\r\nMerge if you think it'd be helpful, and thanks for the slider."}}