{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/react/issues/5010","labels_url":"https://api.github.com/repos/facebook/react/issues/5010/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/5010/comments","events_url":"https://api.github.com/repos/facebook/react/issues/5010/events","html_url":"https://github.com/facebook/react/issues/5010","id":109095672,"number":5010,"title":"Standard mixin substitute for ES6 classes","user":{"login":"marnusw","id":971499,"avatar_url":"https://avatars.githubusercontent.com/u/971499?v=3","gravatar_id":"","url":"https://api.github.com/users/marnusw","html_url":"https://github.com/marnusw","followers_url":"https://api.github.com/users/marnusw/followers","following_url":"https://api.github.com/users/marnusw/following{/other_user}","gists_url":"https://api.github.com/users/marnusw/gists{/gist_id}","starred_url":"https://api.github.com/users/marnusw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marnusw/subscriptions","organizations_url":"https://api.github.com/users/marnusw/orgs","repos_url":"https://api.github.com/users/marnusw/repos","events_url":"https://api.github.com/users/marnusw/events{/privacy}","received_events_url":"https://api.github.com/users/marnusw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-30T13:56:53Z","updated_at":"2015-09-30T13:56:53Z","closed_at":null,"body":"The well used [`react-onclickoutside`](https://www.npmjs.com/package/react-onclickoutside) mixin for detecting mouse clicks outside a React Component cannot be used with ES6 classes. I have proposed a wrapper function/higher-order component/decorator in a PR at Pomax/react-onclickoutside#22.\r\n\r\nThe author @Pomax has asked me to check in and find out whether this aligns with what might become the official approach to realizing mixin-like functionality for ES6 classes before he merges it?\r\n\r\nIt seems to be becoming a *de facto standard* with a couple of larger libraries following this approach including Yahoo's Fluxible in [`connectToStores()`](http://fluxible.io/addons/connectToStores.html) and Material UI in [`ThemeDecorator()`](http://material-ui.com/#/customization/themes). The Relay syntax also appear to be similar?\r\n\r\nThe intended use is documented with the changes in the PR mentioned above."}}