{"action":"created","issue":{"url":"https://api.github.com/repos/twitter-fabric/velocity-react/issues/68","labels_url":"https://api.github.com/repos/twitter-fabric/velocity-react/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/twitter-fabric/velocity-react/issues/68/comments","events_url":"https://api.github.com/repos/twitter-fabric/velocity-react/issues/68/events","html_url":"https://github.com/twitter-fabric/velocity-react/issues/68","id":127437753,"number":68,"title":"How to scroll based on property of wrapped component","user":{"login":"stheobald","id":10693305,"avatar_url":"https://avatars.githubusercontent.com/u/10693305?v=3","gravatar_id":"","url":"https://api.github.com/users/stheobald","html_url":"https://github.com/stheobald","followers_url":"https://api.github.com/users/stheobald/followers","following_url":"https://api.github.com/users/stheobald/following{/other_user}","gists_url":"https://api.github.com/users/stheobald/gists{/gist_id}","starred_url":"https://api.github.com/users/stheobald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stheobald/subscriptions","organizations_url":"https://api.github.com/users/stheobald/orgs","repos_url":"https://api.github.com/users/stheobald/repos","events_url":"https://api.github.com/users/stheobald/events{/privacy}","received_events_url":"https://api.github.com/users/stheobald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-19T12:42:47Z","updated_at":"2016-01-19T14:36:41Z","closed_at":null,"body":"I'm trying to reason my way around getting an element to 'scroll' when a property changes. I have  this.props.active, and when this changes to true, the element should scroll.\r\n\r\nI had anticipated doing something like:\r\n```javascript\r\ncomponentDidUpdate() {\r\n  if (this.props.active) { \r\n    ReactDOM.findDOMNode(this).velocity('scroll', {duration: 500, offset: '54px'});\r\n    // This works --> ReactDOM.findDOMNode(this).scrollIntoView({behavior: 'smooth'});\r\n  }\r\n}\r\n```\r\nBut I haven't managed to get velocity to work in that context (window is not defined).\r\nscrollIntoView works, but we can do much better/nicer/better supported things with velocity.\r\n\r\nIs there a way to solve this scenario using velocity-react?"},"comment":{"url":"https://api.github.com/repos/twitter-fabric/velocity-react/issues/comments/172871789","html_url":"https://github.com/twitter-fabric/velocity-react/issues/68#issuecomment-172871789","issue_url":"https://api.github.com/repos/twitter-fabric/velocity-react/issues/68","id":172871789,"user":{"login":"phopkins","id":260837,"avatar_url":"https://avatars.githubusercontent.com/u/260837?v=3","gravatar_id":"","url":"https://api.github.com/users/phopkins","html_url":"https://github.com/phopkins","followers_url":"https://api.github.com/users/phopkins/followers","following_url":"https://api.github.com/users/phopkins/following{/other_user}","gists_url":"https://api.github.com/users/phopkins/gists{/gist_id}","starred_url":"https://api.github.com/users/phopkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phopkins/subscriptions","organizations_url":"https://api.github.com/users/phopkins/orgs","repos_url":"https://api.github.com/users/phopkins/repos","events_url":"https://api.github.com/users/phopkins/events{/privacy}","received_events_url":"https://api.github.com/users/phopkins/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T14:36:41Z","updated_at":"2016-01-19T14:36:41Z","body":"I haven't tried it, but it's likely to work, since `velocity-react` just calls Velocity on child DOM nodes.\r\n\r\nYou may or may not want `runOnMount` to be true, depending upon how you want the “animation” to be triggered."}}