{"action":"closed","issue":{"url":"https://api.github.com/repos/wuct/react-dom-utils/issues/18","repository_url":"https://api.github.com/repos/wuct/react-dom-utils","labels_url":"https://api.github.com/repos/wuct/react-dom-utils/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/wuct/react-dom-utils/issues/18/comments","events_url":"https://api.github.com/repos/wuct/react-dom-utils/issues/18/events","html_url":"https://github.com/wuct/react-dom-utils/issues/18","id":151395991,"number":18,"title":"RFC - mapPropsOnScroll","user":{"login":"evenchange4","id":1527371,"avatar_url":"https://avatars.githubusercontent.com/u/1527371?v=3","gravatar_id":"","url":"https://api.github.com/users/evenchange4","html_url":"https://github.com/evenchange4","followers_url":"https://api.github.com/users/evenchange4/followers","following_url":"https://api.github.com/users/evenchange4/following{/other_user}","gists_url":"https://api.github.com/users/evenchange4/gists{/gist_id}","starred_url":"https://api.github.com/users/evenchange4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evenchange4/subscriptions","organizations_url":"https://api.github.com/users/evenchange4/orgs","repos_url":"https://api.github.com/users/evenchange4/repos","events_url":"https://api.github.com/users/evenchange4/events{/privacy}","received_events_url":"https://api.github.com/users/evenchange4/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-27T14:11:14Z","updated_at":"2016-04-27T15:48:37Z","closed_at":"2016-04-27T15:48:37Z","body":"## mapPropsOnScroll\r\n> Attaches the props returned by propsMapper to owner props and updates it when a `scroll` event of the `window` is triggered.\r\n\r\n## API\r\n```js\r\ntype Scroll = {\r\n  x: number,\r\n  y: number,\r\n};\r\n\r\nmapPropsOnScroll(\r\n  propsMapper: (scroll: Scroll, previousScroll: Scroll) => Object,\r\n  throttle: Function,\r\n  BaseComponent: ReactElementType\r\n): ReactElementType\r\n```\r\n\r\n## Example\r\n```js\r\nmapPropsOnScroll((scroll, previousScroll) => ({\r\n  isScrollUp: previousScroll.y > scroll.y,\r\n})),\r\n```"}}