{"action":"created","issue":{"url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader/issues/141","repository_url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader","labels_url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader/issues/141/comments","events_url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader/issues/141/events","html_url":"https://github.com/kriasoft/isomorphic-style-loader/pull/141","id":377467073,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NDAzMzM2","number":141,"title":"Upgrade isomorphic-style-loader to React 16.6.0 and use new Context API","user":{"login":"mglace","id":724707,"node_id":"MDQ6VXNlcjcyNDcwNw==","avatar_url":"https://avatars0.githubusercontent.com/u/724707?v=4","gravatar_id":"","url":"https://api.github.com/users/mglace","html_url":"https://github.com/mglace","followers_url":"https://api.github.com/users/mglace/followers","following_url":"https://api.github.com/users/mglace/following{/other_user}","gists_url":"https://api.github.com/users/mglace/gists{/gist_id}","starred_url":"https://api.github.com/users/mglace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mglace/subscriptions","organizations_url":"https://api.github.com/users/mglace/orgs","repos_url":"https://api.github.com/users/mglace/repos","events_url":"https://api.github.com/users/mglace/events{/privacy}","received_events_url":"https://api.github.com/users/mglace/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-05T16:04:11Z","updated_at":"2018-11-05T16:12:33Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader/pulls/141","html_url":"https://github.com/kriasoft/isomorphic-style-loader/pull/141","diff_url":"https://github.com/kriasoft/isomorphic-style-loader/pull/141.diff","patch_url":"https://github.com/kriasoft/isomorphic-style-loader/pull/141.patch"},"body":"I want to take advantage of the new React.Component.contextType property in my React application but it requires React 16.6.0.  I'm not able to upgrade because of a dependency on isomorphic-style-loader which still uses the legacy context API.  Here is a proposed change on how the isomorphic-style-loader can leverage the new React context API.\r\n\r\nUsage:\r\n```\r\nimport StyleContext from 'isomorphic-style-loader/lib/styleContext';\r\n\r\nclass App extends React.PureComponent {\r\n  static propTypes = {\r\n    children: PropTypes.element.isRequired,\r\n  };\r\n\r\n  render() {\r\n    const css = new Set();\r\n    const insertCss = (...styles) => styles.forEach(style => css.add(style._getCss()));\r\n\r\n    return (\r\n      <StyleContext.Provider value={{ insertCss }}>\r\n        {React.Children.only(this.props.children)}\r\n      </StyleContext.Provider>\r\n    );\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader/issues/comments/435933297","html_url":"https://github.com/kriasoft/isomorphic-style-loader/pull/141#issuecomment-435933297","issue_url":"https://api.github.com/repos/kriasoft/isomorphic-style-loader/issues/141","id":435933297,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTkzMzI5Nw==","user":{"login":"coveralls","id":2354108,"node_id":"MDQ6VXNlcjIzNTQxMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T16:12:33Z","updated_at":"2018-11-05T16:12:33Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/19914740/badge)](https://coveralls.io/builds/19914740)\n\nCoverage increased (+0.6%) to 84.211% when pulling **eb6d19097b7d6d45f1f7f59020377ebe471bdbdf on mglace:master** into **0c497661d239e5077e82f8f2b84884c0e55afd40 on kriasoft:master**.\n"}}
{"actor":{"display_login":"coveralls"}}