{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/next.js/issues/4129","repository_url":"https://api.github.com/repos/zeit/next.js","labels_url":"https://api.github.com/repos/zeit/next.js/issues/4129/labels{/name}","comments_url":"https://api.github.com/repos/zeit/next.js/issues/4129/comments","events_url":"https://api.github.com/repos/zeit/next.js/issues/4129/events","html_url":"https://github.com/zeit/next.js/pull/4129","id":312547336,"number":4129,"title":"Expose app.js","user":{"login":"timneutkens","id":6324199,"avatar_url":"https://avatars2.githubusercontent.com/u/6324199?v=4","gravatar_id":"","url":"https://api.github.com/users/timneutkens","html_url":"https://github.com/timneutkens","followers_url":"https://api.github.com/users/timneutkens/followers","following_url":"https://api.github.com/users/timneutkens/following{/other_user}","gists_url":"https://api.github.com/users/timneutkens/gists{/gist_id}","starred_url":"https://api.github.com/users/timneutkens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timneutkens/subscriptions","organizations_url":"https://api.github.com/users/timneutkens/orgs","repos_url":"https://api.github.com/users/timneutkens/repos","events_url":"https://api.github.com/users/timneutkens/events{/privacy}","received_events_url":"https://api.github.com/users/timneutkens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-09T14:12:04Z","updated_at":"2018-04-09T17:12:28Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/zeit/next.js/pulls/4129","html_url":"https://github.com/zeit/next.js/pull/4129","diff_url":"https://github.com/zeit/next.js/pull/4129.diff","patch_url":"https://github.com/zeit/next.js/pull/4129.patch"},"body":"Fixes #88\r\nFixes #4029 \r\n\r\nExamples will be added when this PR lands, since it involves a lot of changes I didn't want to mess up the diff with unrelated files\r\n\r\n- Is rendered on both client and server side\r\n- `this.state` should not be overwritten. Instead create a new component to handle the state ([layout example](./examples/layout-component))\r\n- Handles calling `getInitialProps` of the **page** `Component`\r\n- Implements `componentDidCatch` on the client side, and renders the error page accordingly. ([overriding `componentDidCatch` example](./examples/componentdidcatch))\r\n- The `Container` implements React Hot Loader when in development mode.\r\n- The `Container` implements scrolling to a hash when using `<Link href=\"/about#example-hash\">`\r\n\r\nTo override the default `_app.js` behaviour you can create a file `./pages/_app.js`, where you can extend the `App` class:\r\n\r\n```js\r\nimport App, {Container} from 'next/app'\r\nimport React from 'react'\r\n\r\nexport default class MyApp extends App {\r\n  static async getInitialProps ({ Component, router, 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 <Container>\r\n      <Component {...pageProps} />\r\n    </Container>\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/zeit/next.js/issues/comments/379825727","html_url":"https://github.com/zeit/next.js/pull/4129#issuecomment-379825727","issue_url":"https://api.github.com/repos/zeit/next.js/issues/4129","id":379825727,"user":{"login":"timneutkens","id":6324199,"avatar_url":"https://avatars2.githubusercontent.com/u/6324199?v=4","gravatar_id":"","url":"https://api.github.com/users/timneutkens","html_url":"https://github.com/timneutkens","followers_url":"https://api.github.com/users/timneutkens/followers","following_url":"https://api.github.com/users/timneutkens/following{/other_user}","gists_url":"https://api.github.com/users/timneutkens/gists{/gist_id}","starred_url":"https://api.github.com/users/timneutkens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timneutkens/subscriptions","organizations_url":"https://api.github.com/users/timneutkens/orgs","repos_url":"https://api.github.com/users/timneutkens/repos","events_url":"https://api.github.com/users/timneutkens/events{/privacy}","received_events_url":"https://api.github.com/users/timneutkens/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T17:12:28Z","updated_at":"2018-04-09T17:12:28Z","author_association":"OWNER","body":"@corysimmons among other things, yeah it's one of the possible ways to apply this 👍 "}}
{"actor":{"display_login":"timneutkens"}}