{"action":"created","comment":{"url":"https://api.github.com/repos/callemall/material-ui/pulls/comments/47449426","id":47449426,"diff_hunk":"@@ -51,7 +42,6 @@ const Divider = ({inset, style, ...other}, {muiTheme = ThemeManager.getMuiTheme(\n \n Divider.propTypes = propTypes;\n Divider.defaultProps = defaultProps;\n-Divider.contextTypes = contextTypes;\n-Divider.childContextTypes = childContextTypes;\n+Divider = muiThemeable(Divider);\n \n export default Divider;","path":"src/divider.jsx","position":37,"original_position":37,"commit_id":"9eb32c389c6a88cd548de7445516c6d4ff3f73a8","original_commit_id":"9eb32c389c6a88cd548de7445516c6d4ff3f73a8","user":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"body":"I tried that originally (and wanted to keep it as const)! But I think our eslinter didn't like that for some reason...let me try again and get the actual error","created_at":"2015-12-13T20:09:57Z","updated_at":"2015-12-13T20:09:57Z","html_url":"https://github.com/callemall/material-ui/pull/2493#discussion_r47449426","pull_request_url":"https://api.github.com/repos/callemall/material-ui/pulls/2493","_links":{"self":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/comments/47449426"},"html":{"href":"https://github.com/callemall/material-ui/pull/2493#discussion_r47449426"},"pull_request":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/2493"}}},"pull_request":{"url":"https://api.github.com/repos/callemall/material-ui/pulls/2493","id":53481231,"html_url":"https://github.com/callemall/material-ui/pull/2493","diff_url":"https://github.com/callemall/material-ui/pull/2493.diff","patch_url":"https://github.com/callemall/material-ui/pull/2493.patch","issue_url":"https://api.github.com/repos/callemall/material-ui/issues/2493","number":2493,"state":"open","locked":false,"title":"[WIP] Proposal: mui-themeable higher order component","user":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"body":"I'm just opening this up for discussion, something we could consider at a later date.\r\n\r\nThe React documentation on [context](https://facebook.github.io/react/docs/context.html) says: \r\n\r\n> Regardless of whether you're building an application or a library, try to isolate your use of context to a small area and avoid using the context API directly when possible so that it's easier to upgrade when the API changes.\r\n\r\nThis pull request shows an approach to implementing context for the purpose of themes in a higher order `mui-themeable.js` component. It allows us to develop material-ui components without having to use context directly, and instead receive the `muiTheme` as a prop (even though the higher order component is providing the `muiTheme` prop from context). I also changed the current `Divider.jsx` implementation as an example of how it's used.\r\n\r\n**Note:** This current implementation technically should work as a `@muiThemeable` decorator on classes as well, but since `Divider.jsx` is a function, I couldn't show that as an example. \r\n","created_at":"2015-12-12T17:44:10Z","updated_at":"2015-12-13T20:09:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a34f186c115effdadfdaedb36948d688854098a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/callemall/material-ui/pulls/2493/commits","review_comments_url":"https://api.github.com/repos/callemall/material-ui/pulls/2493/comments","review_comment_url":"https://api.github.com/repos/callemall/material-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/2493/comments","statuses_url":"https://api.github.com/repos/callemall/material-ui/statuses/9eb32c389c6a88cd548de7445516c6d4ff3f73a8","head":{"label":"newoga:mui-themeable-hoc","ref":"mui-themeable-hoc","sha":"9eb32c389c6a88cd548de7445516c6d4ff3f73a8","user":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"repo":{"id":47232679,"name":"material-ui","full_name":"newoga/material-ui","owner":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/newoga/material-ui","description":"React Components that Implement Google's Material Design.","fork":true,"url":"https://api.github.com/repos/newoga/material-ui","forks_url":"https://api.github.com/repos/newoga/material-ui/forks","keys_url":"https://api.github.com/repos/newoga/material-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/newoga/material-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/newoga/material-ui/teams","hooks_url":"https://api.github.com/repos/newoga/material-ui/hooks","issue_events_url":"https://api.github.com/repos/newoga/material-ui/issues/events{/number}","events_url":"https://api.github.com/repos/newoga/material-ui/events","assignees_url":"https://api.github.com/repos/newoga/material-ui/assignees{/user}","branches_url":"https://api.github.com/repos/newoga/material-ui/branches{/branch}","tags_url":"https://api.github.com/repos/newoga/material-ui/tags","blobs_url":"https://api.github.com/repos/newoga/material-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/newoga/material-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/newoga/material-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/newoga/material-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/newoga/material-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/newoga/material-ui/languages","stargazers_url":"https://api.github.com/repos/newoga/material-ui/stargazers","contributors_url":"https://api.github.com/repos/newoga/material-ui/contributors","subscribers_url":"https://api.github.com/repos/newoga/material-ui/subscribers","subscription_url":"https://api.github.com/repos/newoga/material-ui/subscription","commits_url":"https://api.github.com/repos/newoga/material-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/newoga/material-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/newoga/material-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/newoga/material-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/newoga/material-ui/contents/{+path}","compare_url":"https://api.github.com/repos/newoga/material-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/newoga/material-ui/merges","archive_url":"https://api.github.com/repos/newoga/material-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/newoga/material-ui/downloads","issues_url":"https://api.github.com/repos/newoga/material-ui/issues{/number}","pulls_url":"https://api.github.com/repos/newoga/material-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/newoga/material-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/newoga/material-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/newoga/material-ui/labels{/name}","releases_url":"https://api.github.com/repos/newoga/material-ui/releases{/id}","created_at":"2015-12-02T02:48:02Z","updated_at":"2015-12-02T02:48:07Z","pushed_at":"2015-12-13T19:17:17Z","git_url":"git://github.com/newoga/material-ui.git","ssh_url":"git@github.com:newoga/material-ui.git","clone_url":"https://github.com/newoga/material-ui.git","svn_url":"https://github.com/newoga/material-ui","homepage":"http://www.material-ui.com","size":34461,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"callemall:master","ref":"master","sha":"744b0e785da2c46d34e834d27cb94b5de47d408c","user":{"login":"callemall","id":1262264,"avatar_url":"https://avatars.githubusercontent.com/u/1262264?v=3","gravatar_id":"","url":"https://api.github.com/users/callemall","html_url":"https://github.com/callemall","followers_url":"https://api.github.com/users/callemall/followers","following_url":"https://api.github.com/users/callemall/following{/other_user}","gists_url":"https://api.github.com/users/callemall/gists{/gist_id}","starred_url":"https://api.github.com/users/callemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callemall/subscriptions","organizations_url":"https://api.github.com/users/callemall/orgs","repos_url":"https://api.github.com/users/callemall/repos","events_url":"https://api.github.com/users/callemall/events{/privacy}","received_events_url":"https://api.github.com/users/callemall/received_events","type":"Organization","site_admin":false},"repo":{"id":23083156,"name":"material-ui","full_name":"callemall/material-ui","owner":{"login":"callemall","id":1262264,"avatar_url":"https://avatars.githubusercontent.com/u/1262264?v=3","gravatar_id":"","url":"https://api.github.com/users/callemall","html_url":"https://github.com/callemall","followers_url":"https://api.github.com/users/callemall/followers","following_url":"https://api.github.com/users/callemall/following{/other_user}","gists_url":"https://api.github.com/users/callemall/gists{/gist_id}","starred_url":"https://api.github.com/users/callemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callemall/subscriptions","organizations_url":"https://api.github.com/users/callemall/orgs","repos_url":"https://api.github.com/users/callemall/repos","events_url":"https://api.github.com/users/callemall/events{/privacy}","received_events_url":"https://api.github.com/users/callemall/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/callemall/material-ui","description":"React Components that Implement Google's Material Design.","fork":false,"url":"https://api.github.com/repos/callemall/material-ui","forks_url":"https://api.github.com/repos/callemall/material-ui/forks","keys_url":"https://api.github.com/repos/callemall/material-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/callemall/material-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/callemall/material-ui/teams","hooks_url":"https://api.github.com/repos/callemall/material-ui/hooks","issue_events_url":"https://api.github.com/repos/callemall/material-ui/issues/events{/number}","events_url":"https://api.github.com/repos/callemall/material-ui/events","assignees_url":"https://api.github.com/repos/callemall/material-ui/assignees{/user}","branches_url":"https://api.github.com/repos/callemall/material-ui/branches{/branch}","tags_url":"https://api.github.com/repos/callemall/material-ui/tags","blobs_url":"https://api.github.com/repos/callemall/material-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/callemall/material-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/callemall/material-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/callemall/material-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/callemall/material-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/callemall/material-ui/languages","stargazers_url":"https://api.github.com/repos/callemall/material-ui/stargazers","contributors_url":"https://api.github.com/repos/callemall/material-ui/contributors","subscribers_url":"https://api.github.com/repos/callemall/material-ui/subscribers","subscription_url":"https://api.github.com/repos/callemall/material-ui/subscription","commits_url":"https://api.github.com/repos/callemall/material-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/callemall/material-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/callemall/material-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/callemall/material-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/callemall/material-ui/contents/{+path}","compare_url":"https://api.github.com/repos/callemall/material-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/callemall/material-ui/merges","archive_url":"https://api.github.com/repos/callemall/material-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/callemall/material-ui/downloads","issues_url":"https://api.github.com/repos/callemall/material-ui/issues{/number}","pulls_url":"https://api.github.com/repos/callemall/material-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/callemall/material-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/callemall/material-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/callemall/material-ui/labels{/name}","releases_url":"https://api.github.com/repos/callemall/material-ui/releases{/id}","created_at":"2014-08-18T19:11:54Z","updated_at":"2015-12-13T17:22:10Z","pushed_at":"2015-12-13T19:17:18Z","git_url":"git://github.com/callemall/material-ui.git","ssh_url":"git@github.com:callemall/material-ui.git","clone_url":"https://github.com/callemall/material-ui.git","svn_url":"https://github.com/callemall/material-ui","homepage":"http://www.material-ui.com","size":38901,"stargazers_count":12416,"watchers_count":12416,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2008,"mirror_url":null,"open_issues_count":451,"forks":2008,"open_issues":451,"watchers":12416,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/2493"},"html":{"href":"https://github.com/callemall/material-ui/pull/2493"},"issue":{"href":"https://api.github.com/repos/callemall/material-ui/issues/2493"},"comments":{"href":"https://api.github.com/repos/callemall/material-ui/issues/2493/comments"},"review_comments":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/2493/comments"},"review_comment":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/2493/commits"},"statuses":{"href":"https://api.github.com/repos/callemall/material-ui/statuses/9eb32c389c6a88cd548de7445516c6d4ff3f73a8"}}}}