{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/next.js/issues/4170","repository_url":"https://api.github.com/repos/zeit/next.js","labels_url":"https://api.github.com/repos/zeit/next.js/issues/4170/labels{/name}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/4170/comments","events_url":"https://api.github.com/repos/zeit/next.js/issues/4170/events","html_url":"https://github.com/zeit/next.js/issues/4170","id":315442542,"number":4170,"title":"Theming with styled-components","user":{"login":"Tomekmularczyk","id":12544704,"avatar_url":"https://avatars2.githubusercontent.com/u/12544704?v=4","gravatar_id":"","url":"https://api.github.com/users/Tomekmularczyk","html_url":"https://github.com/Tomekmularczyk","followers_url":"https://api.github.com/users/Tomekmularczyk/followers","following_url":"https://api.github.com/users/Tomekmularczyk/following{/other_user}","gists_url":"https://api.github.com/users/Tomekmularczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/Tomekmularczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tomekmularczyk/subscriptions","organizations_url":"https://api.github.com/users/Tomekmularczyk/orgs","repos_url":"https://api.github.com/users/Tomekmularczyk/repos","events_url":"https://api.github.com/users/Tomekmularczyk/events{/privacy}","received_events_url":"https://api.github.com/users/Tomekmularczyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-18T11:36:09Z","updated_at":"2018-04-18T12:27:41Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n\r\nI've described the [problem here](https://stackoverflow.com/questions/49896882/styled-components-and-theming-with-nextjs).\r\n\r\nI try to inject [styled-components theme](https://www.styled-components.com/docs/advanced#theming) to every page but I only get **empty `theme` Object prop passed**. \r\n\r\n```javascript\r\nimport App, { Container } from \"next/app\"; // eslint-disable-line\r\nimport React from \"react\";\r\nimport { ThemeProvider } from \"styled-components\";\r\n\r\nexport default class MyApp extends App {\r\n  static async getInitialProps({ Component, ctx }) {\r\n    let pageProps = {};\r\n\r\n    if (Component.getInitialProps) {\r\n      pageProps = await Component.getInitialProps(ctx);\r\n    }\r\n\r\n    return { pageProps };\r\n  }\r\n\r\n  render() {\r\n    const { Component, pageProps } = this.props;\r\n    return (\r\n      <Container>\r\n        <ThemeProvider theme={{ color: 'blue' }}>\r\n          <Component {...pageProps} />\r\n        </ThemeProvider>\r\n      </Container>\r\n    );\r\n  }\r\n}\r\n\r\n\r\nconst A = styled.a`\r\n  color: ${props => {\r\n    console.log(props.theme); // \"{}\"\r\n    return \"blue\";\r\n  }};\r\n`;\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zeit/next.js/issues/comments/382369005","html_url":"https://github.com/zeit/next.js/issues/4170#issuecomment-382369005","issue_url":"https://api.github.com/repos/zeit/next.js/issues/4170","id":382369005,"user":{"login":"Caryyon","id":9284960,"avatar_url":"https://avatars3.githubusercontent.com/u/9284960?v=4","gravatar_id":"","url":"https://api.github.com/users/Caryyon","html_url":"https://github.com/Caryyon","followers_url":"https://api.github.com/users/Caryyon/followers","following_url":"https://api.github.com/users/Caryyon/following{/other_user}","gists_url":"https://api.github.com/users/Caryyon/gists{/gist_id}","starred_url":"https://api.github.com/users/Caryyon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caryyon/subscriptions","organizations_url":"https://api.github.com/users/Caryyon/orgs","repos_url":"https://api.github.com/users/Caryyon/repos","events_url":"https://api.github.com/users/Caryyon/events{/privacy}","received_events_url":"https://api.github.com/users/Caryyon/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T12:27:41Z","updated_at":"2018-04-18T12:27:41Z","author_association":"NONE","body":"you are also missing:\r\n`import styled from 'styled-components`\r\nit looks like you are just importing the `<ThemeProvider>`"}}
{"actor":{"display_login":"Caryyon"}}