├── .circleci └── config.yml ├── .github ├── ISSUE_TEMPLATE │ ├── 1.Bug_report.md │ ├── 2.Feature_request.md │ ├── 3.Example_Bug_report.md │ ├── 8.Question_about_next.md │ └── 9.Nextjs.org_showcase.md └── lock.yml ├── .gitignore ├── .npmrc ├── .travis.yml ├── azure-pipelines.yml ├── bench ├── package.json ├── pages │ ├── stateless-big.js │ └── stateless.js └── readme.md ├── contributing.md ├── errors ├── build-dir-not-writeable.md ├── generatebuildid-not-a-string.md ├── get-initial-props-as-an-instance-method.md ├── no-document-title.md ├── no-on-app-updated-hook.md ├── popstate-state-empty.md └── url-deprecated.md ├── examples ├── active-class-name │ ├── README.md │ ├── components │ │ ├── Link.js │ │ └── Nav.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ └── index.js ├── analyze-bundles │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ ├── contact.js │ │ └── index.js ├── basic-css │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── basic-export │ ├── .gitignore │ ├── README.md │ ├── package.json │ └── pages │ │ ├── about.js │ │ ├── about2.js │ │ ├── day │ │ └── index.js │ │ └── index.js ├── custom-charset │ ├── README.md │ ├── package.json │ ├── pages │ │ └── index.js │ └── server.js ├── custom-server-actionhero │ ├── README.md │ ├── actions │ │ └── render.js │ ├── config │ │ ├── api.js │ │ ├── errors.js │ │ ├── i18n.js │ │ ├── logger.js │ │ ├── plugins.js │ │ ├── redis.js │ │ ├── routes.js │ │ ├── servers │ │ │ ├── socket.js │ │ │ ├── web.js │ │ │ └── websocket.js │ │ └── tasks.js │ ├── dump.rdb │ ├── initializers │ │ └── next.js │ ├── locales │ │ └── en.json │ ├── package.json │ └── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js ├── custom-server-express │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ ├── index.js │ │ └── posts.js │ └── server.js ├── custom-server-fastify │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ └── server.js ├── custom-server-hapi │ ├── README.md │ ├── next-wrapper.js │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ └── server.js ├── custom-server-koa │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ └── server.js ├── custom-server-micro │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ └── server.js ├── custom-server-nodemon │ ├── README.md │ ├── nodemon.json │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ └── server │ │ └── index.js ├── custom-server-polka │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ └── server.js ├── custom-server-typescript │ ├── .babelrc │ ├── README.md │ ├── next.config.js │ ├── nodemon.json │ ├── package.json │ ├── pages │ │ ├── a.tsx │ │ ├── b.tsx │ │ └── index.tsx │ ├── server │ │ └── index.ts │ ├── tsconfig.json │ └── tsconfig.server.json ├── custom-server │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── a.js │ │ ├── b.js │ │ └── index.js │ └── server.js ├── data-fetch │ ├── README.md │ ├── package.json │ └── pages │ │ ├── index.js │ │ └── preact.js ├── form-handler │ ├── README.md │ ├── actions │ │ ├── formActionsCreators.js │ │ └── index.js │ ├── components │ │ ├── DisplayForm.js │ │ ├── Header.js │ │ ├── Social.js │ │ ├── UserForm.js │ │ └── index.js │ ├── constants │ │ └── index.js │ ├── handlers │ │ └── Input.js │ ├── package.json │ ├── pages │ │ └── index.js │ ├── reducers │ │ ├── formReducer.js │ │ └── index.js │ ├── server.js │ └── store.js ├── gh-pages │ ├── .babelrc.js │ ├── .gitignore │ ├── README.md │ ├── env-config.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ └── index.js ├── head-elements │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── hello-world │ ├── README.md │ ├── package.json │ └── pages │ │ ├── about.js │ │ ├── day │ │ └── index.js │ │ └── index.js ├── layout-component │ ├── README.md │ ├── components │ │ └── layout.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ ├── contact.js │ │ └── index.js ├── nested-components │ ├── README.md │ ├── components │ │ ├── paragraph.js │ │ └── post.js │ ├── package.json │ └── pages │ │ └── index.js ├── only-client-render-external-dependencies │ ├── README.md │ ├── components │ │ ├── BarChart.js │ │ └── LineChart.js │ ├── package.json │ └── pages │ │ ├── chart.js │ │ └── index.js ├── page-transitions │ └── README.md ├── parameterized-routing │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── blog.js │ │ └── index.js │ └── server.js ├── pass-server-data │ ├── README.md │ ├── data │ │ └── item.json │ ├── operations │ │ └── get-item.js │ ├── package.json │ ├── pages │ │ ├── index.js │ │ └── item.js │ └── server.js ├── progressive-render │ ├── README.md │ ├── components │ │ └── Loading.js │ ├── package.json │ └── pages │ │ └── index.js ├── root-static-files │ ├── README.md │ ├── package.json │ ├── pages │ │ └── index.js │ ├── server.js │ └── static │ │ ├── favicon.ico │ │ ├── robots.txt │ │ └── sitemap.xml ├── shared-modules │ ├── README.md │ ├── components │ │ ├── Counter.js │ │ └── Header.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ └── index.js ├── ssr-caching │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── blog.js │ │ └── index.js │ └── server.js ├── svg-components │ ├── .babelrc │ ├── README.md │ ├── package.json │ ├── pages │ │ └── index.js │ └── svgs │ │ └── cat.svg ├── using-inferno │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── about.js │ │ └── index.js │ └── server.js ├── using-nerv │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── about.js │ │ └── index.js │ └── server.js ├── using-preact │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── about.js │ │ └── index.js │ └── server.js ├── using-router │ ├── README.md │ ├── components │ │ └── Header.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ ├── error.js │ │ └── index.js ├── using-with-router │ ├── README.md │ ├── components │ │ ├── ActiveLink.js │ │ └── Header.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ ├── error.js │ │ └── index.js ├── with-absolute-imports │ ├── README.md │ ├── components │ │ └── header.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-algolia-react-instantsearch │ ├── .gitignore │ ├── README.md │ ├── components │ │ ├── app.js │ │ ├── head.js │ │ ├── index.js │ │ └── instantsearch.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── static │ │ ├── favicon.ico │ │ └── instantsearch.css ├── with-amp │ ├── README.md │ ├── components │ │ └── Byline.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ ├── dog.js │ │ └── index.js │ └── static │ │ ├── cat.jpg │ │ └── dog.jpg ├── with-ant-design-less │ ├── .babelrc │ ├── README.md │ ├── assets │ │ └── antd-custom.less │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-ant-design │ ├── .babelrc │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-antd-mobile │ ├── .babelrc │ ├── README.md │ ├── components │ │ └── Layout.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── _app.js │ │ ├── about.js │ │ └── index.js ├── with-aphrodite │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-apollo-and-redux-saga │ ├── README.md │ ├── components │ │ ├── App.js │ │ ├── Clock.js │ │ ├── ErrorMessage.js │ │ ├── Header.js │ │ ├── Page.js │ │ ├── PageCount.js │ │ ├── Placeholder.js │ │ ├── Post.js │ │ ├── PostList.js │ │ ├── PostVoteButton.js │ │ ├── PostVoteCount.js │ │ ├── PostVoteDown.js │ │ ├── PostVoteUp.js │ │ └── Submit.js │ ├── lib │ │ ├── clock │ │ │ ├── actions.js │ │ │ ├── reducers.js │ │ │ └── sagas.js │ │ ├── count │ │ │ ├── actions.js │ │ │ └── reducers.js │ │ ├── initApollo.js │ │ ├── placeholder │ │ │ ├── actions.js │ │ │ ├── reducers.js │ │ │ └── sagas.js │ │ ├── rootReducer.js │ │ ├── rootSaga.js │ │ ├── withApollo.js │ │ └── withReduxSaga.js │ ├── package.json │ ├── pages │ │ ├── about.js │ │ ├── blog │ │ │ ├── entry.js │ │ │ └── index.js │ │ └── index.js │ ├── routes.js │ └── server.js ├── with-apollo-and-redux │ ├── README.md │ ├── components │ │ ├── AddCount.js │ │ ├── App.js │ │ ├── Clock.js │ │ ├── ErrorMessage.js │ │ ├── Header.js │ │ ├── Page.js │ │ ├── PostList.js │ │ ├── PostUpvoter.js │ │ └── Submit.js │ ├── lib │ │ ├── initApollo.js │ │ ├── store.js │ │ └── withApollo.js │ ├── package.json │ └── pages │ │ ├── apollo.js │ │ ├── index.js │ │ └── redux.js ├── with-apollo-auth │ ├── README.md │ ├── components │ │ ├── RegisterBox.js │ │ └── SigninBox.js │ ├── lib │ │ ├── checkLoggedIn.js │ │ ├── initApollo.js │ │ ├── redirect.js │ │ └── withApollo.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── create-account.js │ │ ├── index.js │ │ └── signin.js │ └── project.graphcool ├── with-apollo │ ├── README.md │ ├── components │ │ ├── App.js │ │ ├── ErrorMessage.js │ │ ├── Header.js │ │ ├── PostList.js │ │ ├── PostUpvoter.js │ │ └── Submit.js │ ├── lib │ │ ├── init-apollo.js │ │ └── with-apollo-client.js │ ├── package.json │ └── pages │ │ ├── _app.js │ │ ├── about.js │ │ └── index.js ├── with-app-layout │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ └── index.js │ └── readme.md ├── with-asset-imports │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── static │ │ └── logo.png ├── with-babel-macros │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-carbon-components │ ├── .gitignore │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ └── index.js │ └── static │ │ ├── export.scss │ │ └── myCustomTheme.scss ├── with-cerebral │ ├── README.md │ ├── components │ │ ├── Clock.js │ │ └── Page.js │ ├── modules │ │ └── clock │ │ │ ├── actions.js │ │ │ ├── index.js │ │ │ ├── provider.js │ │ │ └── signals.js │ ├── package.json │ └── pages │ │ ├── index.js │ │ └── other.js ├── with-cloud9 │ ├── README.md │ ├── package.json │ ├── pages │ │ └── index.js │ └── server.js ├── with-componentdidcatch │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ └── index.js │ └── readme.md ├── with-configured-preset-env │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-context-api │ ├── README.md │ ├── components │ │ └── CounterProvider.js │ ├── package.json │ └── pages │ │ ├── _app.js │ │ └── index.js ├── with-custom-babel-config │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-custom-reverse-proxy │ ├── .babelrc │ ├── .eslintrc │ ├── README.md │ ├── package.json │ ├── pages │ │ └── index.js │ └── server.js ├── with-cxs │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-data-prefetch │ ├── README.md │ ├── components │ │ └── link.js │ ├── package.json │ └── pages │ │ ├── article.js │ │ └── index.js ├── with-docker │ ├── .dockerignore │ ├── Dockerfile │ ├── Dockerfile.multistage │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-dotenv │ ├── .env │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-draft-js │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-dynamic-app-layout │ ├── layouts │ │ ├── BlueLayout.js │ │ ├── GreenLayout.js │ │ └── RedLayout.js │ ├── pages │ │ ├── _app.js │ │ ├── green.js │ │ ├── index.js │ │ └── red.js │ └── readme.md ├── with-dynamic-import │ ├── README.md │ ├── components │ │ ├── Counter.js │ │ ├── Header.js │ │ ├── hello1.js │ │ ├── hello2.js │ │ ├── hello3.js │ │ ├── hello4.js │ │ ├── hello5.js │ │ ├── hello6.js │ │ └── hello7.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ └── index.js ├── with-electron │ ├── README.md │ ├── main │ │ ├── index.js │ │ └── preload.js │ ├── package.json │ └── renderer │ │ ├── next.config.js │ │ └── pages │ │ └── start.js ├── with-emotion-fiber │ ├── README.md │ ├── features │ │ └── home.component.js │ ├── hoc │ │ └── withEmotion.component.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ └── index.js │ └── shared │ │ └── styles.js ├── with-emotion │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-external-scoped-css │ └── README.md ├── with-external-styled-jsx-sass │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── styles │ │ └── style.scss ├── with-fela │ ├── FelaProvider.js │ ├── README.md │ ├── getFelaRenderer.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-firebase-authentication │ ├── README.md │ ├── credentials │ │ ├── client.js │ │ └── server.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── server.js ├── with-firebase-cloud-messaging │ ├── .gitignore │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ ├── server.js │ ├── static │ │ └── firebase-messaging-sw.js │ └── utils │ │ └── webPush.js ├── with-firebase-hosting-and-typescript │ ├── .babelrc │ ├── .firebaserc │ ├── .gitignore │ ├── README.md │ ├── firebase.json │ ├── package.json │ └── src │ │ ├── app │ │ ├── .babelrc │ │ ├── components │ │ │ ├── App.tsx │ │ │ └── Header.tsx │ │ ├── next.config.js │ │ ├── pages │ │ │ ├── about.tsx │ │ │ └── index.tsx │ │ ├── tsconfig.json │ │ └── tslint.json │ │ ├── functions │ │ ├── src │ │ │ ├── app │ │ │ │ └── next.ts │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ └── tslint.json │ │ └── public │ │ └── placeholder.html ├── with-firebase-hosting │ ├── .firebaserc │ ├── .gitignore │ ├── README.md │ ├── firebase.json │ ├── package.json │ └── src │ │ ├── app │ │ ├── .babelrc │ │ ├── components │ │ │ ├── App.js │ │ │ └── Header.js │ │ ├── next.config.js │ │ └── pages │ │ │ ├── about.js │ │ │ └── index.js │ │ ├── functions │ │ ├── .babelrc │ │ └── index.js │ │ └── public │ │ └── placeholder.html ├── with-flow │ ├── .babelrc │ ├── .eslintrc.json │ ├── .flowconfig │ ├── README.md │ ├── components │ │ └── Page.js │ ├── flow-typed │ │ └── next.js.flow │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── about.js │ │ ├── contact.js │ │ └── index.js │ └── with-flow.gif ├── with-freactal │ ├── README.md │ ├── components │ │ └── app.js │ ├── githubApi.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── provideState.js ├── with-glamor │ ├── .babelrc │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-glamorous │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-global-stylesheet-simple │ └── README.md ├── with-global-stylesheet │ └── README.md ├── with-google-analytics │ ├── README.md │ ├── components │ │ ├── Header.js │ │ └── Page.js │ ├── lib │ │ └── gtag.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ ├── about.js │ │ ├── contact.js │ │ └── index.js ├── with-hashed-statics │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── static │ │ ├── file.txt │ │ └── images │ │ ├── logo.png │ │ └── logo.svg ├── with-higher-order-component │ ├── README.md │ ├── components │ │ └── Nav.js │ ├── hocs │ │ ├── withLanguages.js │ │ └── withUserAgent.js │ ├── lib │ │ └── getDisplayName.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ └── index.js ├── with-immutable-redux-wrapper │ ├── README.md │ ├── components │ │ ├── AddCount.js │ │ ├── Clock.js │ │ └── Page.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── index.js │ │ └── other.js │ └── store.js ├── with-ioc │ ├── .babelrc │ ├── README.md │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── blog.page_with_provide.test.js.snap │ │ │ ├── endpoint.component_with_inject.test.js.snap │ │ │ └── index.page_without_provide.test.js.snap │ │ ├── blog.page_with_provide.test.js │ │ ├── endpoint.component_with_inject.test.js │ │ └── index.page_without_provide.test.js │ ├── components │ │ ├── component1.js │ │ ├── component2.js │ │ ├── endbutton.js │ │ └── endpoint.js │ ├── jest.config.js │ ├── jest.setup.js │ ├── package.json │ ├── pages │ │ ├── about.js │ │ ├── blog.js │ │ └── index.js │ ├── routes.js │ └── server.js ├── with-jest-typescript │ ├── .babelrc │ ├── README.md │ ├── jest.config.js │ ├── jest.setup.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── cars.tsx │ │ ├── index.tsx │ │ └── login.tsx │ ├── src │ │ ├── components │ │ │ └── NiceCheckbox │ │ │ │ ├── index.tsx │ │ │ │ └── test.tsx │ │ └── modules │ │ │ ├── auth │ │ │ ├── Login.tsx │ │ │ ├── __tests__ │ │ │ │ └── Login.test.tsx │ │ │ └── types.ts │ │ │ └── cars │ │ │ ├── Detail.tsx │ │ │ ├── Overview.tsx │ │ │ ├── __tests__ │ │ │ ├── Detail.test.tsx │ │ │ └── Overview.test.tsx │ │ │ └── types.ts │ └── tsconfig.json ├── with-jest │ ├── .babelrc │ ├── README.md │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── index.test.js.snap │ │ └── index.test.js │ ├── jest.config.js │ ├── jest.setup.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-kea │ ├── .babelrc │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ └── index.js │ └── store.js ├── with-loading │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── _document.js │ │ ├── about.js │ │ ├── forever.js │ │ └── index.js │ └── static │ │ └── nprogress.css ├── with-markdown │ ├── README.md │ ├── md │ │ ├── markdown.mdx │ │ └── other.mdx │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── hello.mdx │ │ └── index.js ├── with-material-ui │ └── README.md ├── with-mdx │ ├── README.md │ ├── components │ │ └── button.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.mdx ├── with-mobx-state-tree-typescript │ ├── .babelrc │ ├── README.md │ ├── components │ │ ├── Clock.tsx │ │ └── SampleComponent.tsx │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _app.tsx │ │ ├── index.tsx │ │ └── other.tsx │ ├── stores │ │ └── store.ts │ ├── tsconfig.json │ └── tslint.json ├── with-mobx-state-tree │ ├── .babelrc │ ├── README.md │ ├── components │ │ ├── Clock.js │ │ └── SampleComponent.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── index.js │ │ └── other.js │ └── stores │ │ └── store.js ├── with-mobx │ ├── .babelrc │ ├── README.md │ ├── components │ │ ├── Clock.js │ │ └── Page.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── index.js │ │ └── other.js │ └── store.js ├── with-mocha │ ├── .babelrc │ ├── README.md │ ├── mocha.setup.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── test │ │ ├── index.test.js │ │ └── mocha.opts ├── with-next-css │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── style.css ├── with-next-i18next │ └── README.md ├── with-next-less │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ └── index.js │ └── style.less ├── with-next-page-transitions │ ├── README.md │ ├── components │ │ └── Loader.js │ ├── package.json │ └── pages │ │ ├── _app.js │ │ ├── _document.js │ │ ├── about.js │ │ └── index.js ├── with-next-routes │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── about.js │ │ ├── blog.js │ │ └── index.js │ ├── routes.js │ └── server.js ├── with-next-sass │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ └── index.js │ └── styles │ │ └── style.scss ├── with-noscript │ ├── README.md │ ├── components │ │ └── Noscript.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── static │ │ └── img │ │ ├── angular.jpg │ │ ├── nextjs.png │ │ ├── reactjs.png │ │ └── vuejs.png ├── with-now-env │ ├── README.md │ ├── next.config.js │ ├── now-secrets.json │ ├── now.json │ ├── package.json │ └── pages │ │ └── index.js ├── with-pkg │ ├── README.md │ ├── index.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── server.js ├── with-polyfills │ ├── README.md │ ├── client │ │ └── polyfills.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-portals │ ├── README.md │ ├── components │ │ ├── Modal.js │ │ └── Portal.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-prefetching │ ├── README.md │ ├── components │ │ └── Header.js │ ├── package.json │ └── pages │ │ ├── _app.js │ │ ├── about.js │ │ ├── contact.js │ │ ├── features.js │ │ └── index.js ├── with-pretty-url-routing │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── greeting.js │ │ └── index.js │ ├── routes.js │ └── server.js ├── with-react-ga │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── about.js │ │ └── index.js │ └── utils │ │ └── analytics.js ├── with-react-helmet │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ ├── about.js │ │ └── index.js ├── with-react-intl │ ├── .babelrc │ ├── .gitignore │ ├── README.md │ ├── components │ │ ├── Layout.js │ │ └── Nav.js │ ├── lang │ │ ├── en.json │ │ └── fr.json │ ├── lib │ │ └── withIntl.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── _document.js │ │ ├── about.js │ │ └── index.js │ ├── scripts │ │ └── default-lang.js │ └── server.js ├── with-react-jss │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _app.js │ │ ├── _document.js │ │ └── index.js ├── with-react-md │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── static │ │ └── react-md.light_blue-yellow.min.css ├── with-react-native-web │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-react-relay-network-modern │ ├── .babelrc │ ├── .env │ ├── .gitignore │ ├── .graphqlconfig │ ├── README.md │ ├── components │ │ ├── BlogPostPreview.js │ │ └── BlogPosts.js │ ├── lib │ │ └── createEnvironment │ │ │ ├── client.js │ │ │ ├── index.js │ │ │ └── server.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ └── index.js │ └── schema │ │ └── init-schema.graphql ├── with-react-toolbox │ ├── README.md │ ├── package.json │ ├── pages │ │ └── index.js │ └── static │ │ ├── theme.css │ │ └── theme.js ├── with-react-useragent │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _app.js │ │ └── index.js ├── with-react-uwp │ ├── README.md │ ├── components │ │ └── ThemeWrapper.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-react-with-styles │ ├── README.md │ ├── defaultTheme.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ └── index.js │ └── withStyles.js ├── with-reasonml │ ├── .babelrc │ ├── .gitignore │ ├── README.md │ ├── bindings │ │ └── Next.re │ ├── bsconfig.json │ ├── components │ │ ├── Counter.re │ │ └── Header.re │ ├── index.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── about.re │ │ └── index.re ├── with-rebass │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-recompose │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-redux-code-splitting │ ├── README.md │ ├── config │ │ └── redux.js │ ├── containers │ │ ├── about.js │ │ └── homepage.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ └── index.js ├── with-redux-observable │ ├── README.md │ ├── components │ │ └── CharacterInfo.js │ ├── demo.png │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── index.js │ │ └── other.js │ └── redux │ │ ├── actionTypes.js │ │ ├── actions.js │ │ ├── epics.js │ │ ├── index.js │ │ └── reducer.js ├── with-redux-reselect-recompose │ ├── .babelrc │ ├── .eslintrc │ ├── .gitignore │ ├── README.md │ ├── actions │ │ └── index.js │ ├── components │ │ ├── addCount.js │ │ ├── clock.js │ │ └── page.js │ ├── constants │ │ └── actionTypes.js │ ├── containers │ │ └── page.js │ ├── package.json │ ├── pages │ │ ├── index.js │ │ └── other.js │ ├── reducers │ │ ├── count.js │ │ └── index.js │ ├── selectors │ │ └── index.js │ └── store.js ├── with-redux-saga │ ├── README.md │ ├── actions.js │ ├── components │ │ ├── clock.js │ │ ├── counter.js │ │ └── page.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── index.js │ │ └── other.js │ ├── reducer.js │ ├── saga.js │ └── store.js ├── with-redux-wrapper │ ├── .npmrc │ ├── README.md │ ├── components │ │ ├── AddCount.js │ │ ├── Clock.js │ │ └── Page.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── index.js │ │ └── other.js │ └── store.js ├── with-redux │ ├── README.md │ ├── components │ │ ├── clock.js │ │ ├── counter.js │ │ └── examples.js │ ├── lib │ │ └── with-redux-store.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ └── index.js │ └── store.js ├── with-reflux │ ├── README.md │ ├── actions │ │ └── actions.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── store │ │ └── counterStore.js ├── with-refnux │ ├── README.md │ ├── helpers │ │ ├── getStore.js │ │ └── withRefnux.js │ ├── package.json │ ├── pages │ │ ├── page1.js │ │ └── page2.js │ └── store │ │ ├── counterIncrement.js │ │ ├── getInitialState.js │ │ ├── getStore.js │ │ └── setTitle.js ├── with-relay-modern │ ├── .babelrc │ ├── .env │ ├── .gitignore │ ├── .graphqlconfig │ ├── README.md │ ├── components │ │ ├── BlogPostPreview.js │ │ └── BlogPosts.js │ ├── lib │ │ ├── RelayProvider.js │ │ ├── createRelayEnvironment.js │ │ └── withData.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── schema │ │ └── init-schema.graphql ├── with-rematch │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── github-users.js │ │ └── index.js │ └── shared │ │ ├── components │ │ ├── counter-display.js │ │ └── header.js │ │ ├── models │ │ ├── counter.js │ │ ├── github.js │ │ └── index.js │ │ ├── store.js │ │ └── utils │ │ └── withRematch.js ├── with-scoped-stylesheets-and-postcss │ └── README.md ├── with-segment-analytics │ ├── README.md │ ├── components │ │ └── Header.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ ├── about.js │ │ ├── contact.js │ │ └── index.js ├── with-semantic-ui │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-sentry │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _app.js │ │ └── index.js ├── with-shallow-routing │ ├── README.md │ ├── package.json │ └── pages │ │ ├── about.js │ │ └── index.js ├── with-sitemap-and-robots-express-server-typescript │ ├── .babelrc │ ├── .gitignore │ ├── .npmignore │ ├── README.md │ ├── now.json │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── RobotsLink.tsx │ │ │ └── SitemapLink.tsx │ │ ├── pages │ │ │ └── index.tsx │ │ ├── server │ │ │ ├── app.ts │ │ │ ├── posts.ts │ │ │ └── sitemapAndRobots.ts │ │ └── static │ │ │ └── robots.txt │ ├── tsconfig.express.json │ ├── tsconfig.next.json │ └── tslint.json ├── with-sitemap-and-robots-express-server │ ├── .gitignore │ ├── .npmignore │ ├── README.md │ ├── now.json │ ├── package.json │ ├── pages │ │ └── index.js │ ├── server │ │ ├── app.js │ │ ├── posts.js │ │ └── sitemapAndRobots.js │ └── static │ │ └── robots.txt ├── with-slate │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-socket.io │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ ├── clone.js │ │ └── index.js │ └── server.js ├── with-static-export │ ├── README.md │ ├── components │ │ └── post.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── index.js │ │ └── post.js │ └── server.js ├── with-storybook │ ├── .storybook │ │ ├── addons.js │ │ └── config.js │ ├── README.md │ ├── components │ │ └── index.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── stories │ │ └── index.stories.js ├── with-strict-csp-hash │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-strict-csp │ ├── README.md │ ├── csp.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ └── index.js │ └── server.js ├── with-style-sheet │ ├── .babelrc │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-styled-components │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-styled-jsx-plugins │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-styled-jsx-postcss │ └── readme.md ├── with-styled-jsx-scss │ ├── .babelrc │ ├── README.md │ ├── package.json │ └── pages │ │ └── index.js ├── with-styletron │ ├── README.md │ ├── layout.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _document.js │ │ └── index.js │ └── styletron.js ├── with-sw-precache │ ├── .babelrc │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ └── server.js ├── with-tailwindcss │ ├── README.md │ ├── components │ │ └── nav.js │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _app.js │ │ └── index.js │ ├── postcss.config.js │ ├── styles │ │ ├── button.css │ │ └── index.css │ └── tailwind.config.js ├── with-ts-node │ ├── README.md │ ├── next.config.js │ ├── nodemon.json │ ├── package.json │ ├── pages │ │ ├── a.tsx │ │ ├── b.tsx │ │ └── index.tsx │ ├── server │ │ └── index.ts │ └── tsconfig.json ├── with-typescript │ ├── .babelrc │ ├── README.md │ ├── components │ │ └── Layout.tsx │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── about.tsx │ │ └── index.tsx │ └── tsconfig.json ├── with-typestyle │ ├── README.md │ ├── package.json │ └── pages │ │ ├── _document.js │ │ └── index.js ├── with-typings-for-css-modules │ ├── .babelrc │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.tsx │ ├── style.css │ ├── style.css.d.ts │ └── tsconfig.json ├── with-universal-configuration-runtime │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-universal-configuration │ ├── .babelrc.js │ ├── README.md │ ├── env-config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-unstated │ ├── .gitignore │ ├── README.md │ ├── components │ │ ├── Clock.js │ │ ├── Counter.js │ │ └── index.js │ ├── containers │ │ ├── ClockContainer.js │ │ ├── CounterContainer.js │ │ └── index.js │ ├── package.json │ └── pages │ │ ├── _app.js │ │ ├── about.js │ │ └── index.js ├── with-url-object-routing │ ├── README.md │ ├── package.json │ ├── pages │ │ ├── about.js │ │ └── index.js │ └── server.js ├── with-videojs │ ├── README.md │ ├── components │ │ └── Player.js │ ├── next.config.js │ ├── package.json │ └── pages │ │ └── index.js ├── with-webassembly │ ├── .gitignore │ ├── Cargo.toml │ ├── add.wasm │ ├── next.config.js │ ├── package.json │ ├── pages │ │ └── index.js │ ├── readme.md │ ├── server.js │ └── src │ │ └── add.rs ├── with-webpack-bundle-analyzer │ └── README.md ├── with-webpack-bundle-size-analyzer │ ├── README.md │ ├── next.config.js │ ├── package.json │ └── pages │ │ ├── about.js │ │ ├── contact.js │ │ └── index.js ├── with-yarn-workspaces │ ├── README.md │ ├── package.json │ └── packages │ │ ├── bar │ │ ├── index.js │ │ └── package.json │ │ ├── foo │ │ ├── index.js │ │ └── package.json │ │ └── web-app │ │ ├── next.config.js │ │ ├── package.json │ │ └── pages │ │ └── index.js └── with-zones │ ├── README.md │ ├── blog │ ├── .gitignore │ ├── next.config.js │ ├── now.json │ ├── package.json │ └── pages │ │ └── blog.js │ ├── home │ ├── .gitignore │ ├── components │ │ └── Header.js │ ├── next.config.js │ ├── now.json │ ├── package.json │ ├── pages │ │ ├── about.js │ │ └── index.js │ └── static │ │ ├── nextjs.png │ │ └── zeit.png │ ├── package.json │ ├── rules-dev.json │ └── rules-prod.json ├── jest.config.js ├── lerna.json ├── license.md ├── package.json ├── packages ├── next-server │ ├── asset.js │ ├── config.js │ ├── constants.js │ ├── dynamic.js │ ├── head.js │ ├── index.js │ ├── lib │ │ ├── asset.js │ │ ├── constants.js │ │ ├── dynamic.js │ │ ├── event-emitter.js │ │ ├── head.js │ │ ├── loadable-capture.js │ │ ├── loadable.js │ │ ├── router │ │ │ ├── router.js │ │ │ └── shallow-equals.js │ │ ├── runtime-config.js │ │ ├── side-effect.js │ │ └── utils.js │ ├── license.md │ ├── next-config.js │ ├── package.json │ ├── server │ │ ├── config.js │ │ ├── get-dynamic-import-bundles.ts │ │ ├── get-page-files.ts │ │ ├── lib │ │ │ └── path-match.js │ │ ├── next-server.ts │ │ ├── render.js │ │ ├── require.ts │ │ ├── router.ts │ │ ├── send-html.ts │ │ ├── serve-static.ts │ │ └── utils.ts │ ├── taskfile-typescript.js │ ├── taskfile.js │ └── tsconfig.json └── next │ ├── README.md │ ├── app.js │ ├── asset.js │ ├── babel.js │ ├── bin │ ├── next │ ├── next-build │ ├── next-dev │ ├── next-export │ ├── next-init │ └── next-start │ ├── build │ ├── babel │ │ ├── plugins │ │ │ ├── commonjs.ts │ │ │ ├── next-to-next-server.ts │ │ │ └── react-loadable-plugin.ts │ │ └── preset.ts │ ├── compiler.ts │ ├── generate-build-id.ts │ ├── index.ts │ ├── is-writeable.ts │ ├── webpack-config.js │ ├── webpack │ │ ├── loaders │ │ │ ├── emit-file-loader.js │ │ │ ├── hot-self-accept-loader.js │ │ │ └── next-babel-loader.js │ │ ├── plugins │ │ │ ├── assets-size-plugin.js │ │ │ ├── build-manifest-plugin.js │ │ │ ├── chunk-names-plugin.js │ │ │ ├── nextjs-require-cache-hot-reloader.js │ │ │ ├── nextjs-ssr-import.js │ │ │ ├── nextjs-ssr-module-cache.js │ │ │ ├── pages-manifest-plugin.js │ │ │ ├── pages-plugin.js │ │ │ ├── react-loadable-plugin.js │ │ │ └── unlink-file-plugin.js │ │ └── utils.js │ └── write-build-id.ts │ ├── client.js │ ├── client │ ├── dev-error-overlay │ │ ├── eventsource.js │ │ ├── format-webpack-messages.js │ │ └── hot-dev-client.js │ ├── error-boundary.js │ ├── head-manager.js │ ├── index.js │ ├── link.js │ ├── next-dev.js │ ├── next.js │ ├── noop.js │ ├── on-demand-entries-client.js │ ├── page-loader.js │ ├── router.js │ ├── source-map-support.js │ ├── webpack-hot-middleware-client.js │ └── with-router.js │ ├── config.js │ ├── constants.js │ ├── document.js │ ├── dynamic.js │ ├── error.js │ ├── export │ └── index.js │ ├── head.js │ ├── lib │ ├── constants.js │ └── promisify.js │ ├── license.md │ ├── link.js │ ├── package.json │ ├── pages │ ├── _app.js │ ├── _document.js │ └── _error.js │ ├── router.js │ ├── server │ ├── error-debug.js │ ├── hot-reloader.js │ ├── lib │ │ ├── error-overlay-middleware.js │ │ ├── start-server.js │ │ └── utils.js │ ├── next-dev-server.js │ ├── next.js │ └── on-demand-entry-handler.js │ ├── taskfile-typescript.js │ ├── taskfile.js │ ├── tsconfig.json │ └── types │ └── index.d.ts ├── readme.md └── test ├── .babelrc ├── .gitignore ├── integration ├── app-aspath │ ├── pages │ │ ├── _app.js │ │ └── index.js │ └── test │ │ └── index.test.js ├── app-document │ ├── pages │ │ ├── _app.js │ │ ├── _document.js │ │ ├── about.js │ │ ├── index.js │ │ └── shared.js │ ├── shared-module.js │ └── test │ │ ├── client.js │ │ ├── csp.js │ │ ├── index.test.js │ │ └── rendering.js ├── babel │ ├── .babelrc │ ├── pages │ │ └── index.js │ └── test │ │ ├── .babelrc │ │ ├── index.test.js │ │ └── rendering.js ├── basic │ ├── components │ │ ├── hello-chunkfilename.js │ │ ├── hello-context.js │ │ ├── hello.jsx │ │ ├── hello1.js │ │ ├── hello2.js │ │ ├── hello3.js │ │ ├── hello4.js │ │ ├── hmr │ │ │ └── dynamic.js │ │ ├── welcome.js │ │ └── world.jsx │ ├── lib │ │ ├── async-function.js │ │ ├── cdm.js │ │ └── data.json │ ├── next.config.js │ ├── pages │ │ ├── async-props.js │ │ ├── custom-encoding.js │ │ ├── custom-extension.jsx │ │ ├── default-head.js │ │ ├── dynamic │ │ │ ├── bundle.js │ │ │ ├── chunkfilename.js │ │ │ ├── function.js │ │ │ ├── head.js │ │ │ ├── index.js │ │ │ ├── multiple-modules.js │ │ │ ├── no-chunk.js │ │ │ ├── no-ssr-custom-loading.js │ │ │ ├── no-ssr.js │ │ │ ├── ssr-true.js │ │ │ └── ssr.js │ │ ├── empty-get-initial-props.js │ │ ├── error-in-the-browser-global-scope.js │ │ ├── error-in-the-global-scope.js │ │ ├── error-inside-browser-page.js │ │ ├── error-inside-page.js │ │ ├── exports.js │ │ ├── fragment-syntax.js │ │ ├── head.js │ │ ├── hmr │ │ │ ├── about.js │ │ │ ├── contact.js │ │ │ ├── counter.js │ │ │ ├── error-in-gip.js │ │ │ ├── index.js │ │ │ ├── style-dynamic-component.js │ │ │ ├── style-stateful-component.js │ │ │ └── style.js │ │ ├── index.js │ │ ├── json.js │ │ ├── link.js │ │ ├── nav │ │ │ ├── about.js │ │ │ ├── as-path-pushstate.js │ │ │ ├── as-path-using-router.js │ │ │ ├── as-path.js │ │ │ ├── hash-changes.js │ │ │ ├── head-1.js │ │ │ ├── head-2.js │ │ │ ├── index.js │ │ │ ├── on-click.js │ │ │ ├── pass-href-prop.js │ │ │ ├── querystring.js │ │ │ ├── redirect.js │ │ │ ├── self-reload.js │ │ │ ├── shallow-routing.js │ │ │ ├── url-prop-change.js │ │ │ └── with-hoc.js │ │ ├── nested-cdm │ │ │ └── index.js │ │ ├── no-default-export.js │ │ ├── process-env.js │ │ ├── read-only-object-error.js │ │ ├── stateless.js │ │ ├── styled-jsx.js │ │ ├── url-prop-override.js │ │ ├── url-prop.js │ │ ├── using-asset │ │ │ ├── asset.js │ │ │ └── index.js │ │ └── with-cdm.js │ └── test │ │ ├── asset.js │ │ ├── client-navigation.js │ │ ├── dynamic.js │ │ ├── error-recovery.js │ │ ├── hmr.js │ │ ├── index.test.js │ │ ├── process-env.js │ │ └── rendering.js ├── config │ ├── .gitignore │ ├── components │ │ ├── hello-webpack-css.css │ │ ├── hello-webpack-css.js │ │ └── hello-webpack-sass.scss │ ├── next.config.js │ ├── node_modules │ │ └── css-framework │ │ │ └── framework.css │ ├── pages │ │ ├── build-id.js │ │ ├── next-config.js │ │ └── webpack-css.js │ └── test │ │ ├── client.js │ │ ├── index.test.js │ │ └── rendering.js ├── custom-server │ ├── next.config.js │ ├── pages │ │ ├── asset.js │ │ └── index.js │ ├── server.js │ └── test │ │ └── index.test.js ├── dist-dir │ ├── next.config.js │ ├── pages │ │ └── index.js │ └── test │ │ └── index.test.js ├── export │ ├── .gitignore │ ├── components │ │ └── hello.js │ ├── next.config.js │ ├── pages │ │ ├── about.js │ │ ├── asset.js │ │ ├── button-link.js │ │ ├── counter.js │ │ ├── dynamic-imports.js │ │ ├── dynamic.js │ │ ├── get-initial-props-with-no-query.js │ │ ├── index.js │ │ ├── level1 │ │ │ ├── about.js │ │ │ └── index.js │ │ └── query.js │ └── test │ │ ├── browser.js │ │ ├── dev.js │ │ ├── index.test.js │ │ └── ssr.js ├── filesystempublicroutes │ ├── next.config.js │ ├── pages │ │ ├── exportpathmap-route.js │ │ └── index.js │ ├── server.js │ └── test │ │ └── index.test.js ├── lambdas │ ├── next.config.js │ ├── pages │ │ ├── fetch.js │ │ └── index.js │ └── test │ │ └── index.test.js ├── ondemand │ ├── components │ │ └── hello.js │ ├── next.config.js │ ├── pages │ │ ├── about.js │ │ ├── index.js │ │ ├── nav │ │ │ ├── dynamic.js │ │ │ └── index.js │ │ └── third.js │ └── test │ │ └── index.test.js ├── page-extensions │ ├── .babelrc │ ├── next.config.js │ ├── pages │ │ └── hmr │ │ │ └── some-page.tsx │ └── test │ │ ├── .babelrc │ │ ├── hmr.js │ │ └── index.test.js ├── production-config │ ├── next.config.js │ ├── pages │ │ ├── _app.js │ │ └── index.js │ ├── styles.css │ └── test │ │ └── index.test.js ├── production │ ├── components │ │ ├── hello-context.js │ │ ├── hello1.js │ │ ├── hello2.js │ │ └── welcome.js │ ├── info.json │ ├── next.config.js │ ├── pages │ │ ├── about.js │ │ ├── counter.js │ │ ├── dynamic │ │ │ ├── bundle.js │ │ │ ├── index.js │ │ │ ├── no-chunk.js │ │ │ ├── no-ssr-custom-loading.js │ │ │ ├── no-ssr.js │ │ │ ├── ssr-true.js │ │ │ └── ssr.js │ │ ├── error-in-browser-render-status-code.js │ │ ├── error-in-browser-render.js │ │ ├── error-in-ssr-render.js │ │ ├── finish-response.js │ │ ├── index.js │ │ ├── prefetch.js │ │ └── process-env.js │ ├── static │ │ └── data │ │ │ └── item.txt │ └── test │ │ ├── dynamic.js │ │ ├── index.test.js │ │ ├── process-env.js │ │ └── security.js ├── size-limit │ ├── next.config.js │ ├── pages │ │ ├── about.js │ │ └── index.js │ └── test │ │ └── index.test.js └── with-router │ ├── components │ └── header-nav.js │ ├── pages │ ├── _app.js │ ├── a.js │ └── b.js │ └── test │ └── index.test.js ├── isolated ├── _resolvedata │ ├── .gitignore │ ├── aa │ │ └── index.js │ ├── bb │ │ └── index.json │ ├── cc │ │ ├── index.js │ │ └── index.json │ ├── one.js │ ├── one.json │ ├── server │ │ ├── pages-manifest.json │ │ └── static │ │ │ └── development │ │ │ └── pages │ │ │ ├── _error.js │ │ │ ├── index.js │ │ │ ├── non-existent-child.js │ │ │ └── world.js │ ├── two.json │ ├── with-function │ │ └── next.config.js │ └── without-function │ │ └── next.config.js ├── config.test.js ├── require-page.test.js └── webpack-utils.test.js ├── jest-global-setup.js ├── jest-global-teardown.js ├── lib ├── next-test-utils.js └── next-webdriver.js └── unit ├── EventEmitter.test.js ├── getDisplayName.test.js ├── loadGetInitialProps.test.js ├── router.test.js └── shallow-equal.test.js /.github/ISSUE_TEMPLATE/8.Question_about_next.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question about Next.js 3 | about: If you have a question related to Next.js or the examples. Reach out to the community on https://spectrum.chat/next-js 4 | --- 5 | 6 | # Question about Next.js 7 | 8 | Questions should be posted on https://spectrum.chat/next-js 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/9.Nextjs.org_showcase.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request to be added to the showcase on nextjs.org 3 | about: Apply for your project to be added to nextjs.org 4 | 5 | --- 6 | 7 | # Request to be added to the showcase on nextjs.org 8 | 9 | - Name of company: 10 | - Url: 11 | - Testimonial about Next.js (optional): 12 | -------------------------------------------------------------------------------- /.github/lock.yml: -------------------------------------------------------------------------------- 1 | # Configuration for lock-threads - https://github.com/dessant/lock-threads 2 | 3 | # Number of days of inactivity before a closed issue or pull request is locked 4 | daysUntilLock: 365 5 | # Comment to post before locking. Set to `false` to disable 6 | lockComment: false 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist 3 | .next 4 | 5 | # dependencies 6 | node_modules 7 | package-lock.json 8 | yarn.lock 9 | test/node_modules 10 | 11 | # logs & pids 12 | *.log 13 | pids 14 | 15 | # coverage 16 | .nyc_output 17 | coverage 18 | 19 | # test output 20 | test/**/out 21 | .DS_Store 22 | 23 | # Editors 24 | **/.idea 25 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | save-exact = true 2 | tag-version-prefix="" 3 | -------------------------------------------------------------------------------- /bench/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "next-bench", 3 | "scripts": { 4 | "build": "next build", 5 | "start": "NODE_ENV=production npm run build && NODE_ENV=production next start", 6 | "bench:stateless": "ab -c1 -n3000 http://0.0.0.0:3000/stateless", 7 | "bench:stateless-big": "ab -c1 -n500 http://0.0.0.0:3000/stateless-big" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /bench/pages/stateless-big.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () => { 4 | return ( 5 | 8 | ) 9 | } 10 | 11 | const items = () => { 12 | var out = new Array(10000) 13 | for (let i = 0; i < out.length; i++) { 14 | out[i] =
  • This is row {i + 1}
  • 15 | } 16 | return out 17 | } 18 | -------------------------------------------------------------------------------- /bench/pages/stateless.js: -------------------------------------------------------------------------------- 1 | export default () =>

    My component!

    2 | -------------------------------------------------------------------------------- /errors/generatebuildid-not-a-string.md: -------------------------------------------------------------------------------- 1 | # generateBuildId did not return a string 2 | 3 | #### Why This Error Occurred 4 | 5 | The most common cause for this issue is a custom `next.config.js` with the `generateBuildId` method defined, but it does not return a string. 6 | 7 | #### Possible Ways to Fix It 8 | 9 | Always return a string from generateBuildId. 10 | -------------------------------------------------------------------------------- /examples/active-class-name/pages/about.js: -------------------------------------------------------------------------------- 1 | import Nav from '../components/Nav' 2 | 3 | export default () => ( 4 |
    5 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/active-class-name/pages/index.js: -------------------------------------------------------------------------------- 1 | import Nav from '../components/Nav' 2 | 3 | export default () => ( 4 |
    5 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/analyze-bundles/pages/about.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    About us
    3 | ) 4 | -------------------------------------------------------------------------------- /examples/analyze-bundles/pages/contact.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    3 | This is the contact page. 4 |
    5 | ) 6 | -------------------------------------------------------------------------------- /examples/basic-css/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "basic-css", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/basic-export/.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | -------------------------------------------------------------------------------- /examples/basic-export/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-world", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start", 8 | "export": "next export" 9 | }, 10 | "dependencies": { 11 | "next": "latest", 12 | "react": "^16.0.0", 13 | "react-dom": "^16.0.0" 14 | }, 15 | "license": "ISC" 16 | } 17 | -------------------------------------------------------------------------------- /examples/basic-export/pages/about.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    About us
    3 | ) 4 | -------------------------------------------------------------------------------- /examples/basic-export/pages/about2.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    About 2
    3 | ) 4 | -------------------------------------------------------------------------------- /examples/basic-export/pages/day/index.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    Hello Day
    3 | ) 4 | -------------------------------------------------------------------------------- /examples/basic-export/pages/index.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | export default () => ( 3 |
    Hello World. About
    4 | ) 5 | -------------------------------------------------------------------------------- /examples/custom-charset/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "custom-server", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "node server.js", 6 | "build": "next build", 7 | "start": "NODE_ENV=production node server.js" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/custom-charset/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    áéíóöúü
    4 | -------------------------------------------------------------------------------- /examples/custom-server-actionhero/config/routes.js: -------------------------------------------------------------------------------- 1 | exports['default'] = { 2 | routes: (api) => { 3 | return { 4 | get: [ 5 | { path: '/', matchTrailingPathParts: true, action: 'render' } 6 | ] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/custom-server-actionhero/dump.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/custom-server-actionhero/dump.rdb -------------------------------------------------------------------------------- /examples/custom-server-actionhero/pages/a.js: -------------------------------------------------------------------------------- 1 | export default () =>
    a
    2 | -------------------------------------------------------------------------------- /examples/custom-server-actionhero/pages/b.js: -------------------------------------------------------------------------------- 1 | export default () =>
    b
    2 | -------------------------------------------------------------------------------- /examples/custom-server-actionhero/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/custom-server-express/pages/a.js: -------------------------------------------------------------------------------- 1 | export default () =>
    a
    2 | -------------------------------------------------------------------------------- /examples/custom-server-express/pages/b.js: -------------------------------------------------------------------------------- 1 | export default () =>
    b
    2 | -------------------------------------------------------------------------------- /examples/custom-server-fastify/pages/a.js: -------------------------------------------------------------------------------- 1 | export default () =>
    a
    2 | -------------------------------------------------------------------------------- /examples/custom-server-fastify/pages/b.js: -------------------------------------------------------------------------------- 1 | export default () =>
    b
    2 | -------------------------------------------------------------------------------- /examples/custom-server-fastify/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/custom-server-hapi/pages/a.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    a
    4 | -------------------------------------------------------------------------------- /examples/custom-server-hapi/pages/b.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    b
    4 | -------------------------------------------------------------------------------- /examples/custom-server-hapi/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/custom-server-koa/pages/a.js: -------------------------------------------------------------------------------- 1 | export default () =>
    a
    2 | -------------------------------------------------------------------------------- /examples/custom-server-koa/pages/b.js: -------------------------------------------------------------------------------- 1 | export default () =>
    b
    2 | -------------------------------------------------------------------------------- /examples/custom-server-koa/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/custom-server-micro/pages/a.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    a
    4 | -------------------------------------------------------------------------------- /examples/custom-server-micro/pages/b.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    b
    4 | -------------------------------------------------------------------------------- /examples/custom-server-micro/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/custom-server-nodemon/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": ["server/**/*.js"] 3 | } 4 | -------------------------------------------------------------------------------- /examples/custom-server-nodemon/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "nodemon server/index.js", 4 | "build": "next build", 5 | "start": "NODE_ENV=production node server/index.js" 6 | }, 7 | "dependencies": { 8 | "next": "latest", 9 | "react": "^16.2.0", 10 | "react-dom": "^16.2.0" 11 | }, 12 | "devDependencies": { 13 | "nodemon": "^1.12.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/custom-server-nodemon/pages/a.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    a
    4 | -------------------------------------------------------------------------------- /examples/custom-server-nodemon/pages/b.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    b
    4 | -------------------------------------------------------------------------------- /examples/custom-server-nodemon/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/custom-server-polka/pages/a.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    a
    4 | -------------------------------------------------------------------------------- /examples/custom-server-polka/pages/b.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    b
    4 | -------------------------------------------------------------------------------- /examples/custom-server-polka/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 17 | ) 18 | -------------------------------------------------------------------------------- /examples/custom-server-typescript/next.config.js: -------------------------------------------------------------------------------- 1 | const withTypescript = require('@zeit/next-typescript') 2 | module.exports = withTypescript() 3 | -------------------------------------------------------------------------------- /examples/custom-server-typescript/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": ["server/**/*.ts"], 3 | "execMap": { 4 | "ts": "ts-node --typeCheck --compilerOptions '{\"module\":\"commonjs\"}'" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/custom-server-typescript/pages/a.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    a
    4 | -------------------------------------------------------------------------------- /examples/custom-server-typescript/pages/b.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    b
    4 | -------------------------------------------------------------------------------- /examples/custom-server-typescript/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/custom-server-typescript/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": ".next/production-server/" 6 | }, 7 | "include": ["server/**/*.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /examples/custom-server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "custom-server", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "node server.js", 6 | "build": "next build", 7 | "start": "NODE_ENV=production node server.js" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/custom-server/pages/a.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    a
    4 | -------------------------------------------------------------------------------- /examples/custom-server/pages/b.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>
    b
    4 | -------------------------------------------------------------------------------- /examples/custom-server/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 9 | ) 10 | -------------------------------------------------------------------------------- /examples/data-fetch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "data-fetch", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "isomorphic-unfetch": "^2.0.0", 11 | "next": "latest", 12 | "react": "^16.0.0", 13 | "react-dom": "^16.0.0" 14 | }, 15 | "license": "ISC" 16 | } 17 | -------------------------------------------------------------------------------- /examples/form-handler/actions/formActionsCreators.js: -------------------------------------------------------------------------------- 1 | import { INPUT_VALUE } from '../constants' 2 | 3 | export const inputChange = (title, name, val) => dispatch => { 4 | return dispatch({type: INPUT_VALUE, title, name, val}) 5 | } 6 | -------------------------------------------------------------------------------- /examples/form-handler/actions/index.js: -------------------------------------------------------------------------------- 1 | export * from './formActionsCreators' 2 | -------------------------------------------------------------------------------- /examples/form-handler/constants/index.js: -------------------------------------------------------------------------------- 1 | export const INPUT_VALUE = 'INPUT_VALUE' 2 | -------------------------------------------------------------------------------- /examples/form-handler/pages/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import withRedux from 'next-redux-wrapper' 3 | 4 | import Main from '../components' 5 | 6 | import { initStore } from '../store' 7 | 8 | class Index extends Component { 9 | render () { 10 | return
    11 | } 12 | } 13 | 14 | export default withRedux(initStore, null)(Index) 15 | -------------------------------------------------------------------------------- /examples/form-handler/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux' 2 | import formReducer from './formReducer' 3 | 4 | export default combineReducers({ 5 | formReducer 6 | }) 7 | -------------------------------------------------------------------------------- /examples/form-handler/store.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware } from 'redux' 2 | import thunkMiddleware from 'redux-thunk' 3 | import reducer from './reducers' 4 | 5 | export const initStore = (initialState = {}) => { 6 | return createStore(reducer, initialState, applyMiddleware(thunkMiddleware)) 7 | } 8 | -------------------------------------------------------------------------------- /examples/gh-pages/.babelrc.js: -------------------------------------------------------------------------------- 1 | const env = require('./env-config') 2 | 3 | module.exports = { 4 | 'presets': [ 5 | 'next/babel' 6 | ], 7 | 'plugins': [ 8 | ['transform-define', env] 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /examples/gh-pages/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | -------------------------------------------------------------------------------- /examples/gh-pages/env-config.js: -------------------------------------------------------------------------------- 1 | const prod = process.env.NODE_ENV === 'production' 2 | 3 | module.exports = { 4 | 'process.env.BACKEND_URL': prod ? '/Next-gh-page-example' : '' 5 | } 6 | -------------------------------------------------------------------------------- /examples/gh-pages/pages/about.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | export default () => ( 3 |
    4 |
    About us
    5 |
    Back to Home
    6 |
    7 | ) 8 | -------------------------------------------------------------------------------- /examples/gh-pages/pages/index.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | export default () => ( 3 |
    Hello World. About
    4 | ) 5 | -------------------------------------------------------------------------------- /examples/head-elements/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "head-elements", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/head-elements/pages/index.js: -------------------------------------------------------------------------------- 1 | import Head from 'next/head' 2 | 3 | export default () => ( 4 |
    5 | 6 | This page has a title 🤔 7 | 8 | 9 | 10 | 11 |

    This page has a title 🤔

    12 |
    13 | ) 14 | -------------------------------------------------------------------------------- /examples/hello-world/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello-world", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/hello-world/pages/about.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    About us
    3 | ) 4 | -------------------------------------------------------------------------------- /examples/hello-world/pages/day/index.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    Hello Day
    3 | ) 4 | -------------------------------------------------------------------------------- /examples/hello-world/pages/index.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | export default () => ( 3 |
    Hello World. About
    4 | ) 5 | -------------------------------------------------------------------------------- /examples/layout-component/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "layout-component", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/layout-component/pages/about.js: -------------------------------------------------------------------------------- 1 | import Layout from '../components/layout' 2 | 3 | export default () => ( 4 | 5 |
    About us
    6 |
    7 | ) 8 | -------------------------------------------------------------------------------- /examples/layout-component/pages/contact.js: -------------------------------------------------------------------------------- 1 | import Layout from '../components/layout' 2 | 3 | export default () => ( 4 | 5 |
    Contact
    6 |
    7 | ) 8 | -------------------------------------------------------------------------------- /examples/layout-component/pages/index.js: -------------------------------------------------------------------------------- 1 | import Layout from '../components/layout' 2 | 3 | export default () => ( 4 | 5 |
    Hello World.
    6 |
    7 | ) 8 | -------------------------------------------------------------------------------- /examples/nested-components/components/paragraph.js: -------------------------------------------------------------------------------- 1 | export default ({ children }) => ( 2 |

    3 | {children} 4 | 10 |

    11 | ) 12 | -------------------------------------------------------------------------------- /examples/nested-components/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nested-components", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/page-transitions/README.md: -------------------------------------------------------------------------------- 1 | This example has been deprecated and removed in favor of https://github.com/zeit/next.js/tree/canary/examples/with-next-page-transitions 2 | -------------------------------------------------------------------------------- /examples/pass-server-data/data/item.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Now", 3 | "subtitle": "Realtime global deployments", 4 | "seller": "Zeit" 5 | } 6 | -------------------------------------------------------------------------------- /examples/pass-server-data/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 | 8 | ) 9 | -------------------------------------------------------------------------------- /examples/progressive-render/components/Loading.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () => ( 4 |
    5 |

    Loading...

    6 | 14 |
    15 | ) 16 | -------------------------------------------------------------------------------- /examples/progressive-render/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "progressive-render", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0", 13 | "react-no-ssr": "1.1.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/root-static-files/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "root-static-files", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "node server.js", 6 | "build": "next build", 7 | "start": "NODE_ENV=production node server.js" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/root-static-files/pages/index.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 | 7 | ) 8 | -------------------------------------------------------------------------------- /examples/root-static-files/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/root-static-files/static/favicon.ico -------------------------------------------------------------------------------- /examples/root-static-files/static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /examples/root-static-files/static/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | http://www.example.com/foo.html 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/shared-modules/components/Header.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | 3 | export default () => ( 4 |
    5 | 6 | Home 7 | 8 | 9 | 10 | About 11 | 12 |
    13 | ) 14 | 15 | const styles = { 16 | a: { 17 | marginRight: 10 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/shared-modules/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shared-modules", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/shared-modules/pages/about.js: -------------------------------------------------------------------------------- 1 | import Header from '../components/Header' 2 | import Counter from '../components/Counter' 3 | 4 | export default () => ( 5 |
    6 |
    7 |

    This is the about page.

    8 | 9 |
    10 | ) 11 | -------------------------------------------------------------------------------- /examples/shared-modules/pages/index.js: -------------------------------------------------------------------------------- 1 | import Header from '../components/Header' 2 | import Counter from '../components/Counter' 3 | 4 | export default () => ( 5 |
    6 |
    7 |

    HOME PAGE is here!

    8 | 9 |
    10 | ) 11 | -------------------------------------------------------------------------------- /examples/svg-components/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ "next/babel" ], 3 | "plugins": [ "inline-react-svg" ] 4 | } 5 | -------------------------------------------------------------------------------- /examples/svg-components/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Cat from '../svgs/cat.svg' 3 | 4 | export default () => ( 5 |
    6 | SVG Cat! 7 | 8 | 14 |
    15 | ) 16 | -------------------------------------------------------------------------------- /examples/using-inferno/pages/about.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () => ( 4 |
    About us
    5 | ) 6 | -------------------------------------------------------------------------------- /examples/using-inferno/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 |
    Hello World. About
    6 | ) 7 | -------------------------------------------------------------------------------- /examples/using-nerv/pages/about.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () => ( 4 |
    About us
    5 | ) 6 | -------------------------------------------------------------------------------- /examples/using-nerv/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 |
    Hello World. About
    6 | ) 7 | -------------------------------------------------------------------------------- /examples/using-preact/next.config.js: -------------------------------------------------------------------------------- 1 | const withPreact = require('@zeit/next-preact') 2 | 3 | module.exports = withPreact() 4 | -------------------------------------------------------------------------------- /examples/using-preact/pages/about.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () => ( 4 |
    About us
    5 | ) 6 | -------------------------------------------------------------------------------- /examples/using-preact/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | export default () => ( 5 |
    Hello World. About
    6 | ) 7 | -------------------------------------------------------------------------------- /examples/using-router/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "using-router", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/using-router/pages/about.js: -------------------------------------------------------------------------------- 1 | import Header from '../components/Header' 2 | 3 | export default () => ( 4 |
    5 |
    6 |

    This is the about page.

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/using-router/pages/index.js: -------------------------------------------------------------------------------- 1 | import Header from '../components/Header' 2 | 3 | export default () => ( 4 |
    5 |
    6 |

    HOME PAGE is here!

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/using-with-router/components/Header.js: -------------------------------------------------------------------------------- 1 | import ActiveLink from './ActiveLink' 2 | 3 | export default () => ( 4 |
    5 | Home 6 | About 7 | Error 8 |
    9 | ) 10 | -------------------------------------------------------------------------------- /examples/using-with-router/pages/about.js: -------------------------------------------------------------------------------- 1 | import Header from '../components/Header' 2 | 3 | export default () => ( 4 |
    5 |
    6 |

    This is the about page.

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/using-with-router/pages/index.js: -------------------------------------------------------------------------------- 1 | import Header from '../components/Header' 2 | 3 | export default () => ( 4 |
    5 |
    6 |

    HOME PAGE is here!

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/with-absolute-imports/components/header.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    3 |

    Hello world!

    4 |
    5 | ) 6 | -------------------------------------------------------------------------------- /examples/with-absolute-imports/next.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | webpack (config, options) { 5 | config.resolve.alias['components'] = path.join(__dirname, 'components') 6 | return config 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-absolute-imports/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "next", 4 | "build": "next build", 5 | "start": "next start" 6 | }, 7 | "dependencies": { 8 | "next": "latest", 9 | "react": "^16.1.1", 10 | "react-dom": "^16.1.1" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/with-absolute-imports/pages/index.js: -------------------------------------------------------------------------------- 1 | import Header from 'components/header.js' 2 | 3 | export default () => ( 4 |
    5 |
    6 |
    7 | ) 8 | -------------------------------------------------------------------------------- /examples/with-algolia-react-instantsearch/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | /dist 12 | /.next 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | npm-debug.log* 18 | yarn-debug.log* 19 | yarn-error.log* 20 | -------------------------------------------------------------------------------- /examples/with-algolia-react-instantsearch/components/index.js: -------------------------------------------------------------------------------- 1 | export * from './head' 2 | export { default as App } from './app' 3 | export { findResultsState } from './instantsearch' 4 | -------------------------------------------------------------------------------- /examples/with-algolia-react-instantsearch/components/instantsearch.js: -------------------------------------------------------------------------------- 1 | import { createInstantSearch } from 'react-instantsearch/server' 2 | 3 | const { InstantSearch, findResultsState } = createInstantSearch() 4 | 5 | export { InstantSearch, findResultsState } 6 | -------------------------------------------------------------------------------- /examples/with-algolia-react-instantsearch/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-algolia-react-instantsearch/static/favicon.ico -------------------------------------------------------------------------------- /examples/with-amp/components/Byline.js: -------------------------------------------------------------------------------- 1 | export default ({ author }) => ( 2 |
    3 | By {author} 4 |
    5 | ) 6 | -------------------------------------------------------------------------------- /examples/with-amp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-amp", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/with-amp/static/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-amp/static/cat.jpg -------------------------------------------------------------------------------- /examples/with-amp/static/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-amp/static/dog.jpg -------------------------------------------------------------------------------- /examples/with-ant-design-less/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel"], 3 | "plugins": [ 4 | ["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }], 5 | [ 6 | "import", { 7 | "libraryName": "antd", 8 | "style": true 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /examples/with-ant-design-less/assets/antd-custom.less: -------------------------------------------------------------------------------- 1 | @primary-color: #52c41a; 2 | 3 | @layout-header-height: 40px; 4 | @border-radius-base: 2px; 5 | -------------------------------------------------------------------------------- /examples/with-ant-design/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel"], 3 | "plugins": [ 4 | [ 5 | "import", 6 | { 7 | "libraryName": "antd", 8 | "style": "css" 9 | } 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /examples/with-ant-design/next.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | const withCss = require('@zeit/next-css') 3 | 4 | // fix: prevents error when .css files are required by node 5 | if (typeof require !== 'undefined') { 6 | require.extensions['.css'] = (file) => {} 7 | } 8 | 9 | module.exports = withCss() 10 | -------------------------------------------------------------------------------- /examples/with-antd-mobile/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel"], 3 | "plugins": [ 4 | ["import", { 5 | "libraryName": "antd-mobile", 6 | "style": "css" 7 | }] 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /examples/with-antd-mobile/next.config.js: -------------------------------------------------------------------------------- 1 | const withCSS = require('@zeit/next-css') 2 | 3 | // fix: prevents error when .css files are required by node 4 | if (typeof require !== 'undefined') { 5 | // eslint-disable-next-line 6 | require.extensions['.css'] = (file) => {} 7 | } 8 | 9 | module.exports = withCSS() 10 | -------------------------------------------------------------------------------- /examples/with-antd-mobile/pages/about.js: -------------------------------------------------------------------------------- 1 | import Layout from '../components/Layout' 2 | import { Button } from 'antd-mobile' 3 | import Link from 'next/link' 4 | 5 | export default () => ( 6 | 7 | 8 | 9 | 10 | 11 | ) 12 | -------------------------------------------------------------------------------- /examples/with-antd-mobile/pages/index.js: -------------------------------------------------------------------------------- 1 | import Layout from '../components/Layout' 2 | import { Button } from 'antd-mobile' 3 | import Link from 'next/link' 4 | 5 | export default () => ( 6 | 7 | 8 | 9 | 10 | 11 | ) 12 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux-saga/components/ErrorMessage.js: -------------------------------------------------------------------------------- 1 | export default ({message}) => ( 2 | 13 | ) 14 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux-saga/components/PostVoteCount.js: -------------------------------------------------------------------------------- 1 | export default ({votes}) => ( 2 | 3 | {votes} 4 | 11 | 12 | ) 13 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux-saga/lib/count/actions.js: -------------------------------------------------------------------------------- 1 | export const actionTypes = { 2 | COUNT_INCREASE: 'COUNT_INCREASE', 3 | COUNT_DECREASE: 'COUNT_DECREASE' 4 | } 5 | 6 | export function countIncrease () { 7 | return { type: actionTypes.COUNT_INCREASE } 8 | } 9 | 10 | export function countDecrease () { 11 | return { type: actionTypes.COUNT_DECREASE } 12 | } 13 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux-saga/lib/rootReducer.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux' 2 | 3 | import clock from './clock/reducers' 4 | import count from './count/reducers' 5 | import placeholder from './placeholder/reducers' 6 | 7 | export default combineReducers({ 8 | clock, 9 | count, 10 | placeholder 11 | }) 12 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux-saga/lib/rootSaga.js: -------------------------------------------------------------------------------- 1 | import { all } from 'redux-saga/effects' 2 | 3 | import clock from './clock/sagas' 4 | import placeholder from './placeholder/sagas' 5 | 6 | function * rootSaga () { 7 | yield all([clock, placeholder]) 8 | } 9 | 10 | export default rootSaga 11 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux-saga/pages/blog/entry.js: -------------------------------------------------------------------------------- 1 | import withApollo from '../../lib/withApollo' 2 | 3 | import App from '../../components/App' 4 | import Header from '../../components/Header' 5 | import Post from '../../components/Post' 6 | 7 | export default withApollo(() => ( 8 | 9 |
    10 | 11 | 12 | )) 13 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux-saga/routes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Parameterized Routing with next-route 3 | * 4 | * Benefits: Less code, and easily handles complex url structures 5 | **/ 6 | const routes = (module.exports = require('next-routes')()) 7 | 8 | routes.add('blog/entry', '/blog/:id') 9 | -------------------------------------------------------------------------------- /examples/with-apollo-and-redux/components/ErrorMessage.js: -------------------------------------------------------------------------------- 1 | export default ({ message }) => ( 2 | 13 | ) 14 | -------------------------------------------------------------------------------- /examples/with-apollo/components/ErrorMessage.js: -------------------------------------------------------------------------------- 1 | export default ({ message }) => ( 2 | 13 | ) 14 | -------------------------------------------------------------------------------- /examples/with-apollo/pages/index.js: -------------------------------------------------------------------------------- 1 | import App from '../components/App' 2 | import Header from '../components/Header' 3 | import Submit from '../components/Submit' 4 | import PostList from '../components/PostList' 5 | 6 | export default () => ( 7 | 8 |
    9 | 10 | 11 | 12 | ) 13 | -------------------------------------------------------------------------------- /examples/with-app-layout/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-app-layout", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "6.0.0-canary.6", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/with-app-layout/pages/index.js: -------------------------------------------------------------------------------- 1 | export default () => { 2 | return
    test
    3 | } 4 | -------------------------------------------------------------------------------- /examples/with-asset-imports/next.config.js: -------------------------------------------------------------------------------- 1 | const withImages = require('next-images') 2 | module.exports = withImages() 3 | -------------------------------------------------------------------------------- /examples/with-asset-imports/pages/index.js: -------------------------------------------------------------------------------- 1 | import avatar from '../static/logo.png' 2 | 3 | export default () => 4 | 5 | -------------------------------------------------------------------------------- /examples/with-asset-imports/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-asset-imports/static/logo.png -------------------------------------------------------------------------------- /examples/with-babel-macros/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel"], 3 | "plugins": ["babel-plugin-macros"] 4 | } 5 | -------------------------------------------------------------------------------- /examples/with-carbon-components/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | .next/* 3 | -------------------------------------------------------------------------------- /examples/with-carbon-components/static/myCustomTheme.scss: -------------------------------------------------------------------------------- 1 | @import './export.scss'; 2 | 3 | @import '../node_modules/carbon-components/scss/globals/scss/styles.scss'; 4 | -------------------------------------------------------------------------------- /examples/with-cerebral/modules/clock/actions.js: -------------------------------------------------------------------------------- 1 | export function startTimer ({clock}) { 2 | clock.start('clock.secondTicked') 3 | } 4 | 5 | export function stopTimer ({clock}) { 6 | clock.stop() 7 | } 8 | -------------------------------------------------------------------------------- /examples/with-cerebral/modules/clock/index.js: -------------------------------------------------------------------------------- 1 | 2 | import {mounted, unMounted, secondTicked} from './signals' 3 | import provider from './provider' 4 | 5 | export default { 6 | state: { 7 | lastUpdate: 0, 8 | light: false 9 | }, 10 | signals: { 11 | mounted, 12 | unMounted, 13 | secondTicked 14 | }, 15 | provider 16 | } 17 | -------------------------------------------------------------------------------- /examples/with-cerebral/modules/clock/signals.js: -------------------------------------------------------------------------------- 1 | import {set} from 'cerebral/operators' 2 | import {state, props} from 'cerebral/tags' 3 | import {startTimer, stopTimer} from './actions' 4 | 5 | export const mounted = [ 6 | startTimer, 7 | set(state`clock.light`, true) 8 | ] 9 | export const unMounted = stopTimer 10 | export const secondTicked = set(state`clock.lastUpdate`, props`now`) 11 | -------------------------------------------------------------------------------- /examples/with-cloud9/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-cloud9", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "node server.js", 6 | "build": "next build", 7 | "start": "NODE_ENV=production node server.js" 8 | }, 9 | "license": "ISC", 10 | "dependencies": { 11 | "next": "^7.0.2", 12 | "react": "^16.5.2", 13 | "react-dom": "^16.5.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/with-cloud9/pages/index.js: -------------------------------------------------------------------------------- 1 | export default () => 'If everything works, you should be able to see me.' 2 | -------------------------------------------------------------------------------- /examples/with-componentdidcatch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-componentdidcatch", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "latest", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/with-componentdidcatch/pages/_app.js: -------------------------------------------------------------------------------- 1 | import App from 'next/app' 2 | 3 | export default class MyApp extends App { 4 | componentDidCatch (error, errorInfo) { 5 | console.log('CUSTOM ERROR HANDLING', error) 6 | // This is needed to render errors correctly in development / production 7 | super.componentDidCatch(error, errorInfo) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/with-configured-preset-env/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "next", 4 | "build": "next build", 5 | "start": "next start" 6 | }, 7 | "dependencies": { 8 | "next": "latest", 9 | "react": "^16.0.0", 10 | "react-dom": "^16.0.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /examples/with-context-api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-context-api", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "next": "^7.0.0-canary.16", 11 | "react": "^16.0.0", 12 | "react-dom": "^16.0.0" 13 | }, 14 | "license": "ISC" 15 | } 16 | -------------------------------------------------------------------------------- /examples/with-custom-babel-config/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel" 4 | ], 5 | "plugins": [ 6 | "@babel/plugin-proposal-do-expressions" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-custom-reverse-proxy/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /examples/with-custom-reverse-proxy/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "standard" 3 | } -------------------------------------------------------------------------------- /examples/with-cxs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-cxs", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "cxs": "^3.0.0", 11 | "next": "latest", 12 | "react": "^16.0.0", 13 | "react-dom": "^16.0.0" 14 | }, 15 | "author": "", 16 | "license": "ISC" 17 | } 18 | -------------------------------------------------------------------------------- /examples/with-data-prefetch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "next", 4 | "build": "next build", 5 | "start": "next start" 6 | }, 7 | "dependencies": { 8 | "isomorphic-unfetch": "^2.0.0", 9 | "next": "latest", 10 | "prop-types": "^15.6.0", 11 | "prop-types-exact": "^1.1.1", 12 | "react": "^16.2.0", 13 | "react-dom": "^16.2.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/with-docker/.dockerignore: -------------------------------------------------------------------------------- 1 | .next/ 2 | node_modules/ 3 | Dockerfile 4 | -------------------------------------------------------------------------------- /examples/with-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mhart/alpine-node 2 | 3 | WORKDIR /app 4 | COPY . . 5 | 6 | RUN yarn install 7 | RUN yarn build 8 | 9 | EXPOSE 3000 10 | CMD ["yarn", "start"] 11 | -------------------------------------------------------------------------------- /examples/with-docker/next.config.js: -------------------------------------------------------------------------------- 1 | // next.config.js 2 | module.exports = { 3 | serverRuntimeConfig: { // Will only be available on the server side 4 | mySecret: 'secret' 5 | }, 6 | publicRuntimeConfig: { // Will be available on both server and client 7 | API_URL: process.env.API_URL 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/with-dotenv/.env: -------------------------------------------------------------------------------- 1 | TEST=it works! 2 | -------------------------------------------------------------------------------- /examples/with-dotenv/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-dotenv", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "next start" 8 | }, 9 | "dependencies": { 10 | "dotenv-webpack": "1.5.7", 11 | "next": "latest", 12 | "react": "^16.0.0", 13 | "react-dom": "^16.0.0" 14 | }, 15 | "license": "ISC" 16 | } 17 | -------------------------------------------------------------------------------- /examples/with-dotenv/pages/index.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    { process.env.TEST }
    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-app-layout/layouts/BlueLayout.js: -------------------------------------------------------------------------------- 1 | export default ({ children }) => { 2 | return
    3 | {children} 4 |
    5 | } 6 | -------------------------------------------------------------------------------- /examples/with-dynamic-app-layout/layouts/GreenLayout.js: -------------------------------------------------------------------------------- 1 | export default ({ children }) => { 2 | return
    3 | {children} 4 |
    5 | } 6 | -------------------------------------------------------------------------------- /examples/with-dynamic-app-layout/layouts/RedLayout.js: -------------------------------------------------------------------------------- 1 | export default ({ children }) => { 2 | return
    3 | {children} 4 |
    5 | } 6 | -------------------------------------------------------------------------------- /examples/with-dynamic-app-layout/pages/_app.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import App, { Container } from 'next/app' 3 | 4 | export default class MyApp extends App { 5 | render () { 6 | const { Component, pageProps } = this.props 7 | return 8 | 9 | 10 | 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/Header.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | 3 | export default () => ( 4 |
    5 | 6 | Home 7 | 8 | 9 | 10 | About 11 | 12 |
    13 | ) 14 | 15 | const styles = { 16 | a: { 17 | marginRight: 10 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/hello1.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |

    Hello World 1 (imported dynamiclly)

    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/hello2.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |

    Hello World 2 (imported dynamiclly)

    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/hello3.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |

    Hello World 3 (imported dynamiclly)

    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/hello4.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |

    Hello World 4 (imported dynamiclly)

    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/hello5.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |

    Hello World 5 (imported dynamiclly)

    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/hello6.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |

    Hello World 6 (imported dynamiclly)

    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/components/hello7.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |

    Hello World 7 (imported dynamiclly)

    3 | ) 4 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | exportPathMap: function () { 3 | return { 4 | '/': { page: '/', query: { showMore: false } }, 5 | '/about': { page: '/about' } 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-dynamic-import/pages/about.js: -------------------------------------------------------------------------------- 1 | import Header from '../components/Header' 2 | import Counter from '../components/Counter' 3 | 4 | const About = () => ( 5 |
    6 |
    7 |

    This is the about page.

    8 | 9 |
    10 | ) 11 | 12 | export default About 13 | -------------------------------------------------------------------------------- /examples/with-electron/main/preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | // Since we disabled nodeIntegration we can reintroduce 4 | // needed node functionality here 5 | process.once('loaded', () => { 6 | global.ipcRenderer = ipcRenderer 7 | }) 8 | -------------------------------------------------------------------------------- /examples/with-electron/renderer/next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | exportPathMap () { 3 | // Let Next.js know where to find the entry page 4 | // when it's exporting the static bundle for the use 5 | // in the production version of your app 6 | return { 7 | '/start': { page: '/start' } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/with-emotion-fiber/features/home.component.js: -------------------------------------------------------------------------------- 1 | import {Basic, Combined, Animated, bounce} from '../shared/styles' 2 | const Home = () => ( 3 |
    4 | Cool Styles 5 | 6 | With :hover. 7 | 8 | Let's bounce. 9 |
    10 | ) 11 | 12 | export default Home 13 | -------------------------------------------------------------------------------- /examples/with-emotion-fiber/pages/index.js: -------------------------------------------------------------------------------- 1 | import withEmotion from '../hoc/withEmotion.component' 2 | import home from '../features/home.component' 3 | 4 | export default withEmotion(home) 5 | -------------------------------------------------------------------------------- /examples/with-emotion/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel" 4 | ], 5 | "plugins": [ 6 | ["emotion"] 7 | ] 8 | } -------------------------------------------------------------------------------- /examples/with-external-scoped-css/README.md: -------------------------------------------------------------------------------- 1 | 2 | # With external scoped css 3 | 4 | This example has been deprecated in favor of [@zeit/next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css). 5 | -------------------------------------------------------------------------------- /examples/with-external-styled-jsx-sass/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "next", 4 | "build": "next build", 5 | "start": "next start" 6 | }, 7 | "dependencies": { 8 | "next": "latest", 9 | "react": "^16.2.0", 10 | "react-dom": "^16.2.0" 11 | }, 12 | "devDependencies": { 13 | "node-sass": "^4.7.2", 14 | "sass-loader": "7.1.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/with-external-styled-jsx-sass/pages/index.js: -------------------------------------------------------------------------------- 1 | import styles from '../styles/style.scss' 2 | 3 | export default () => 4 |
    5 | Hello World! 6 | 7 |
    8 | -------------------------------------------------------------------------------- /examples/with-external-styled-jsx-sass/styles/style.scss: -------------------------------------------------------------------------------- 1 | $color: #2ecc71; 2 | 3 | div { 4 | background-color: $color; 5 | :hover { 6 | background-color: darken($color, 20%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-fela/getFelaRenderer.js: -------------------------------------------------------------------------------- 1 | import { createRenderer } from 'fela' 2 | import webPreset from 'fela-preset-web' 3 | 4 | export default function getRenderer () { 5 | return createRenderer({ 6 | plugins: [ 7 | ...webPreset 8 | ] 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /examples/with-firebase-authentication/credentials/client.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // TODO firebase client config 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-firebase-authentication/credentials/server.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // TODO firebase server config 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-firebase-cloud-messaging/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next -------------------------------------------------------------------------------- /examples/with-firebase-cloud-messaging/next.config.js: -------------------------------------------------------------------------------- 1 | const withOffline = require('next-offline') 2 | 3 | const nextConfig = { 4 | // your nextjs config 5 | } 6 | module.exports = withOffline(nextConfig) 7 | -------------------------------------------------------------------------------- /examples/with-firebase-cloud-messaging/pages/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { firebaseCloudMessaging } from '../utils/webPush' 3 | 4 | class Index extends Component { 5 | componentDidMount () { 6 | firebaseCloudMessaging.init() 7 | } 8 | render () { 9 | return
    Next.js with firebase cloud messaging.
    10 | } 11 | } 12 | 13 | export default Index 14 | -------------------------------------------------------------------------------- /examples/with-firebase-cloud-messaging/static/firebase-messaging-sw.js: -------------------------------------------------------------------------------- 1 | /* global importScripts, firebase */ 2 | importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js') 3 | importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js') 4 | 5 | firebase.initializeApp({ 6 | messagingSenderId: 'your sender id' 7 | }) 8 | 9 | firebase.messaging() 10 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel", 4 | "@zeit/next-typescript/babel" 5 | ] 6 | } -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel", "@zeit/next-typescript/babel"] 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/app/components/App.tsx: -------------------------------------------------------------------------------- 1 | import Header from './Header'; 2 | 3 | const App = ({ children }: { children?: any }) => ( 4 |
    5 |
    6 | {children} 7 |
    8 | ); 9 | 10 | export default App; 11 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/app/next.config.js: -------------------------------------------------------------------------------- 1 | const withTypescript = require('@zeit/next-typescript') 2 | module.exports = withTypescript({ distDir: '../../dist/functions/next' }) 3 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/app/pages/about.tsx: -------------------------------------------------------------------------------- 1 | import App from '../components/App'; 2 | 3 | export default () => ( 4 | 5 |

    About Page

    6 |
    7 | ); 8 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/app/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import App from '../components/App'; 2 | 3 | export default () => ( 4 | 5 |

    Index Page

    6 |
    7 | ); 8 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/app/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["tslint:latest", "tslint-react"], 3 | "rules": { 4 | "quotemark": [true, "single"], 5 | "no-submodule-imports": false 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/functions/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as functions from 'firebase-functions'; 2 | 3 | export { nextApp } from './app/next'; -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/functions/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["es6"], 4 | "module": "commonjs", 5 | "noImplicitReturns": true, 6 | "outDir": "../../dist/functions", 7 | "sourceMap": true, 8 | "target": "es6", 9 | "baseUrl": "./src" 10 | }, 11 | "compileOnSave": true, 12 | "include": ["src"] 13 | } 14 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting-and-typescript/src/public/placeholder.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-firebase-hosting-and-typescript/src/public/placeholder.html -------------------------------------------------------------------------------- /examples/with-firebase-hosting/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting/.gitignore: -------------------------------------------------------------------------------- 1 | dist/ -------------------------------------------------------------------------------- /examples/with-firebase-hosting/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "dist/public", 4 | "rewrites": [ 5 | { 6 | "source": "**/**", 7 | "function": "next" 8 | } 9 | ] 10 | }, 11 | "functions": { 12 | "source": "dist/functions" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting/src/app/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [["next/babel"]] 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting/src/app/components/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Header from './Header' 3 | 4 | const App = ({ children }) => ( 5 |
    6 |
    7 | {children} 8 |
    9 | ) 10 | 11 | export default App 12 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting/src/app/next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | distDir: '../../dist/functions/next' 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting/src/app/pages/about.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import App from '../components/App' 3 | 4 | export default () => ( 5 | 6 |

    About Page

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting/src/app/pages/index.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import App from '../components/App' 3 | 4 | export default () => ( 5 | 6 |

    Index Page

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/with-firebase-hosting/src/functions/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "node": "6.11.5" 8 | } 9 | } 10 | ] 11 | ] 12 | } -------------------------------------------------------------------------------- /examples/with-firebase-hosting/src/public/placeholder.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-firebase-hosting/src/public/placeholder.html -------------------------------------------------------------------------------- /examples/with-flow/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel" 4 | ], 5 | "plugins": [ 6 | "transform-flow-strip-types" 7 | ] 8 | } -------------------------------------------------------------------------------- /examples/with-flow/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint" 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-flow/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/node_modules/* 3 | 4 | [include] 5 | 6 | [libs] 7 | 8 | [options] 9 | -------------------------------------------------------------------------------- /examples/with-flow/pages/about.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import Page from '../components/Page' 4 | 5 | export default () => ( 6 | 7 |
    About us
    8 |
    9 | ) 10 | -------------------------------------------------------------------------------- /examples/with-flow/pages/contact.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import Page from '../components/Page' 4 | 5 | export default () => ( 6 | 7 |
    Contact
    8 |
    9 | ) 10 | -------------------------------------------------------------------------------- /examples/with-flow/pages/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react' 3 | import Page from '../components/Page' 4 | 5 | export default () => ( 6 | 7 |
    Hello World
    8 |
    9 | ) 10 | -------------------------------------------------------------------------------- /examples/with-flow/with-flow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-flow/with-flow.gif -------------------------------------------------------------------------------- /examples/with-freactal/githubApi.js: -------------------------------------------------------------------------------- 1 | /* global fetch */ 2 | import 'isomorphic-unfetch' 3 | 4 | const API_BASE_URL = 'https://api.github.com' 5 | 6 | export const fetchUserRepos = (username, page = 1) => 7 | fetch(`${API_BASE_URL}/users/${username}/repos?page=${page}`) 8 | .then(response => response.json()) 9 | -------------------------------------------------------------------------------- /examples/with-glamor/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel"], 3 | "plugins": [ 4 | [ 5 | "transform-react-jsx", 6 | { "pragma": "Glamor.createElement" } 7 | ] 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /examples/with-global-stylesheet-simple/README.md: -------------------------------------------------------------------------------- 1 | # Global Stylesheet simple example 2 | 3 | This example has been deprecated. Please use [examples/with-next-css](../with-next-css) instead. 4 | -------------------------------------------------------------------------------- /examples/with-global-stylesheet/README.md: -------------------------------------------------------------------------------- 1 | # Global Stylesheet Example 2 | 3 | This example has been deprecated. Please use [examples/with-next-css](../with-next-css) instead. 4 | -------------------------------------------------------------------------------- /examples/with-google-analytics/components/Page.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Router from 'next/router' 3 | import Header from './Header' 4 | 5 | import * as gtag from '../lib/gtag' 6 | 7 | Router.events.on('routeChangeComplete', url => gtag.pageview(url)) 8 | 9 | export default ({ children }) => ( 10 |
    11 |
    12 | {children} 13 |
    14 | ) 15 | -------------------------------------------------------------------------------- /examples/with-google-analytics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-google-analytics", 3 | "scripts": { 4 | "dev": "next", 5 | "build": "next build", 6 | "start": "next start" 7 | }, 8 | "dependencies": { 9 | "next": "latest", 10 | "react": "^16.2.0", 11 | "react-dom": "^16.2.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/with-google-analytics/pages/about.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Page from '../components/Page' 3 | 4 | export default () => ( 5 | 6 |

    This is the About page

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/with-google-analytics/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Page from '../components/Page' 3 | 4 | export default () => ( 5 | 6 |

    This is the Home page

    7 |
    8 | ) 9 | -------------------------------------------------------------------------------- /examples/with-hashed-statics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "next dev", 4 | "build": "next build", 5 | "start": "next" 6 | }, 7 | "dependencies": { 8 | "babel-plugin-transform-assets": "^0.2.0", 9 | "next": "latest", 10 | "react": "16.2.0", 11 | "react-dom": "16.2.0" 12 | }, 13 | "devDependencies": { 14 | "file-loader": "2.0.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/with-hashed-statics/static/file.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-hashed-statics/static/file.txt -------------------------------------------------------------------------------- /examples/with-hashed-statics/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oddcommit/Next-All-App/ae33f3f6a81ae352236b816db23b992b3d8e7831/examples/with-hashed-statics/static/images/logo.png -------------------------------------------------------------------------------- /examples/with-higher-order-component/components/Nav.js: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | 3 | export const Nav = () => ( 4 |
      5 |
    • 6 | 7 | Index 8 | 9 |
    • 10 |
    • 11 | 12 | About 13 | 14 |
    • 15 |
    16 | ) 17 | -------------------------------------------------------------------------------- /examples/with-higher-order-component/lib/getDisplayName.js: -------------------------------------------------------------------------------- 1 | export function getDisplayName (Component) { 2 | return Component.displayName || Component.name || 'Unknown' 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-ioc/components/component1.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Component2 from './component2' 3 | 4 | export default () => ( 5 |
    6 |

    Component1

    7 | Knows nothing about any custom `Link` or `Router` components or prop 8 | 9 |
    10 | ) 11 | -------------------------------------------------------------------------------- /examples/with-ioc/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | setupFiles: ['/jest.setup.js'], 3 | testPathIgnorePatterns: ['/.next/', '/node_modules/'] 4 | } 5 | -------------------------------------------------------------------------------- /examples/with-ioc/jest.setup.js: -------------------------------------------------------------------------------- 1 | import { configure } from 'enzyme' 2 | import Adapter from 'enzyme-adapter-react-16' 3 | 4 | configure({ adapter: new Adapter() }) 5 | -------------------------------------------------------------------------------- /examples/with-ioc/pages/about.js: -------------------------------------------------------------------------------- 1 | export default props =>

    About foo – no `Link` ({typeof props.Link}) available here

    2 | -------------------------------------------------------------------------------- /examples/with-ioc/routes.js: -------------------------------------------------------------------------------- 1 | const nextRoutes = require('next-routes') 2 | const routes = module.exports = nextRoutes() 3 | 4 | routes.add('blog', '/blog/:slug') 5 | routes.add('about', '/about-us/:foo(bar|baz)') 6 | -------------------------------------------------------------------------------- /examples/with-jest-typescript/jest.setup.js: -------------------------------------------------------------------------------- 1 | const Enzyme = require('enzyme') 2 | const Adapter = require('enzyme-adapter-react-16') 3 | 4 | Enzyme.configure({adapter: new Adapter()}) 5 | -------------------------------------------------------------------------------- /examples/with-jest-typescript/next.config.js: -------------------------------------------------------------------------------- 1 | const withTypescript = require('@zeit/next-typescript') 2 | module.exports = withTypescript() 3 | -------------------------------------------------------------------------------- /examples/with-jest-typescript/pages/cars.tsx: -------------------------------------------------------------------------------- 1 | import CarsOverview from './../src/modules/cars/Overview'; 2 | 3 | const CarsPage = () => ; 4 | 5 | export default CarsPage; -------------------------------------------------------------------------------- /examples/with-jest-typescript/pages/index.tsx: -------------------------------------------------------------------------------- 1 | const IndexPage = () =>

    Testing Next.js App written in TypeScript with Jest

    ; 2 | 3 | export default IndexPage; -------------------------------------------------------------------------------- /examples/with-jest-typescript/pages/login.tsx: -------------------------------------------------------------------------------- 1 | import Login from './../src/modules/auth/Login'; 2 | 3 | const LoginPage = () => ; 4 | 5 | export default LoginPage; -------------------------------------------------------------------------------- /examples/with-jest-typescript/src/modules/auth/types.ts: -------------------------------------------------------------------------------- 1 | export interface LoginCredentials { 2 | email: string; 3 | password: string; 4 | } -------------------------------------------------------------------------------- /examples/with-jest-typescript/src/modules/cars/types.ts: -------------------------------------------------------------------------------- 1 | export interface Car { 2 | make : string; 3 | model : string; 4 | engine : string; 5 | year : number; 6 | mileage : number; 7 | equipment : string[]; 8 | } 9 | 10 | export type CarList = Array < Car >; -------------------------------------------------------------------------------- /examples/with-jest/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel"] 3 | } 4 | -------------------------------------------------------------------------------- /examples/with-jest/__tests__/__snapshots__/index.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`With Snapshot Testing App shows "Hello world!" 1`] = ` 4 |
    7 |

    10 | Hello World! 11 |

    12 |
    13 | ` 14 | -------------------------------------------------------------------------------- /examples/with-jest/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | setupFiles: ['/jest.setup.js'], 3 | testPathIgnorePatterns: ['/.next/', '/node_modules/'] 4 | } 5 | -------------------------------------------------------------------------------- /examples/with-jest/jest.setup.js: -------------------------------------------------------------------------------- 1 | import { configure } from 'enzyme' 2 | import Adapter from 'enzyme-adapter-react-16' 3 | 4 | configure({ adapter: new Adapter() }) 5 | -------------------------------------------------------------------------------- /examples/with-jest/pages/index.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    3 | 8 |

    Hello World!

    9 |
    10 | ) 11 | -------------------------------------------------------------------------------- /examples/with-kea/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel" 4 | ], 5 | "plugins": [ 6 | ["@babel/plugin-proposal-decorators", { "legacy": true }] 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-loading/pages/about.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | export default class About extends Component { 4 | // Add some delay 5 | static async getInitialProps () { 6 | await new Promise((resolve) => { 7 | setTimeout(resolve, 500) 8 | }) 9 | return {} 10 | } 11 | 12 | render () { 13 | return

    This is about Next!

    14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/with-loading/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default () =>

    Hello Next!

    4 | -------------------------------------------------------------------------------- /examples/with-markdown/md/markdown.mdx: -------------------------------------------------------------------------------- 1 | import Other from './other.mdx' 2 | 3 | # Hello, world `awesome` :smile_cat: 4 | 5 | 6 | 7 | ```jsx 8 | 9 | ``` 10 | 11 | Here's a paragraph 12 | 13 | https://c8r.imgix.net/028ab8c85da415103cb3b1eb/johno.png 14 | 15 | Here's a table 16 | 17 | | Test | Table | 18 | | :--- | :---- | 19 | | Col1 | Col2 | -------------------------------------------------------------------------------- /examples/with-markdown/md/other.mdx: -------------------------------------------------------------------------------- 1 | ### Other `awesome` 2 | 3 | file -------------------------------------------------------------------------------- /examples/with-markdown/next.config.js: -------------------------------------------------------------------------------- 1 | const images = require('remark-images') 2 | const emoji = require('remark-emoji') 3 | 4 | const withMDX = require('@zeit/next-mdx')({ 5 | options: { 6 | mdPlugins: [ 7 | images, 8 | emoji 9 | ] 10 | } 11 | }) 12 | 13 | module.exports = withMDX({ 14 | pageExtensions: ['js', 'jsx', 'mdx'] 15 | }) 16 | -------------------------------------------------------------------------------- /examples/with-markdown/pages/hello.mdx: -------------------------------------------------------------------------------- 1 | # Hello, world! :smiley: -------------------------------------------------------------------------------- /examples/with-material-ui/README.md: -------------------------------------------------------------------------------- 1 | # Material-UI example 2 | 3 | Source code is hosted on the [Material-UI](https://github.com/mui-org/material-ui/tree/master/examples/nextjs) repository. 4 | -------------------------------------------------------------------------------- /examples/with-mdx/components/button.js: -------------------------------------------------------------------------------- 1 | export default ({ children }) => ( 2 | 12 | ) 13 | -------------------------------------------------------------------------------- /examples/with-mdx/next.config.js: -------------------------------------------------------------------------------- 1 | const withMDX = require('@zeit/next-mdx')({ 2 | extension: /\.mdx?$/ 3 | }) 4 | module.exports = withMDX({ 5 | pageExtensions: ['js', 'jsx', 'mdx'] 6 | }) 7 | -------------------------------------------------------------------------------- /examples/with-mdx/pages/index.mdx: -------------------------------------------------------------------------------- 1 | import Button from '../components/button.js' 2 | 3 | # MDX + Next.js 4 | 5 | Look, a button! 👇 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/with-mobx-state-tree-typescript/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel", 4 | "@zeit/next-typescript/babel" 5 | ], 6 | "plugins": [ 7 | ["@babel/plugin-proposal-decorators", { "legacy": true }] 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /examples/with-mobx-state-tree-typescript/next.config.js: -------------------------------------------------------------------------------- 1 | const withTypescript = require('@zeit/next-typescript') 2 | module.exports = withTypescript() 3 | -------------------------------------------------------------------------------- /examples/with-mobx-state-tree-typescript/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { SampleComponent } from "../components/SampleComponent"; 3 | 4 | class IndexPage extends React.Component { 5 | public render() { 6 | return ( 7 | 8 | ); 9 | } 10 | } 11 | 12 | export default IndexPage; 13 | -------------------------------------------------------------------------------- /examples/with-mobx-state-tree-typescript/pages/other.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { SampleComponent } from "../components/SampleComponent"; 3 | 4 | class OtherPage extends React.Component { 5 | public render() { 6 | return ( 7 | 8 | ); 9 | } 10 | } 11 | 12 | export default OtherPage; 13 | -------------------------------------------------------------------------------- /examples/with-mobx-state-tree/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel" 4 | ], 5 | "plugins": [ 6 | ["@babel/plugin-proposal-decorators", { "legacy": true }] 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-mobx-state-tree/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import SampleComponent from '../components/SampleComponent' 3 | 4 | export default () => { 5 | return ( 6 | 7 | ) 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-mobx-state-tree/pages/other.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import SampleComponent from '../components/SampleComponent' 3 | 4 | export default () => { 5 | return ( 6 | 7 | ) 8 | } 9 | -------------------------------------------------------------------------------- /examples/with-mobx/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "next/babel" 4 | ], 5 | "plugins": [ 6 | ["@babel/plugin-proposal-decorators", { "legacy": true }], 7 | ["@babel/plugin-proposal-class-properties", { "loose": true }] 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /examples/with-mobx/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Page from '../components/Page' 3 | 4 | export default class Counter extends React.Component { 5 | render () { 6 | return ( 7 | 8 | ) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/with-mobx/pages/other.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Page from '../components/Page' 3 | 4 | export default class Counter extends React.Component { 5 | render () { 6 | return ( 7 | 8 | ) 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/with-mocha/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "development": { 4 | "presets": ["next/babel"] 5 | }, 6 | "production": { 7 | "presets": ["next/babel"] 8 | }, 9 | "test": { 10 | "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]] 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /examples/with-mocha/mocha.setup.js: -------------------------------------------------------------------------------- 1 | import Enzyme from 'enzyme' 2 | import Adapter from 'enzyme-adapter-react-16' 3 | 4 | Enzyme.configure({ adapter: new Adapter() }) 5 | -------------------------------------------------------------------------------- /examples/with-mocha/pages/index.js: -------------------------------------------------------------------------------- 1 | export default () => ( 2 |
    3 | 8 |

    Hello World!

    9 |
    10 | ) 11 | -------------------------------------------------------------------------------- /examples/with-mocha/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --require @babel/register 2 | --file mocha.setup.js -------------------------------------------------------------------------------- /examples/with-next-css/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "with-css-modules", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "scripts": { 6 | "dev": "next", 7 | "build": "next build", 8 | "start": "next start" 9 | }, 10 | "dependencies": { 11 | "@zeit/next-css": "^1.0.1", 12 | "next": "latest", 13 | "react": "16.4.2", 14 | "react-dom": "16.4.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/with-next-css/pages/index.js: -------------------------------------------------------------------------------- 1 | 2 | /* Without CSS Modules, maybe with PostCSS */ 3 | 4 | import '../style.css' 5 | 6 | export default () =>
    O Hai world!
    7 | 8 | /* With CSS Modules */ 9 | /* 10 | import css from "../style.css" 11 | 12 | export default () =>
    Hello World, I am being styled using CSS Modules!
    13 | */ 14 | -------------------------------------------------------------------------------- /examples/with-next-css/style.css: -------------------------------------------------------------------------------- 1 | .example { 2 | font-size: 50px; 3 | color: papayawhip; 4 | } 5 | 6 | /* Post-CSS */ 7 | /* 8 | :root { 9 | --some-color: red; 10 | } 11 | 12 | .example { 13 | color: var(--some-color); 14 | } 15 | 16 | */ 17 | -------------------------------------------------------------------------------- /examples/with-next-i18next/README.md: -------------------------------------------------------------------------------- 1 | # with-next-i18next - internationalization using i18next 2 | 3 | The next-i18next module is the simplest way to add internationalization based on i18next to your next.js application providing all the benefits of react-i18next. 4 | 5 | Learn more on [next-i18next](https://github.com/isaachinman/next-i18next). 6 | -------------------------------------------------------------------------------- /examples/with-next-less/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "next", 4 | "build": "next build", 5 | "start": "next start" 6 | }, 7 | "dependencies": { 8 | "@zeit/next-less": "^1.0.1", 9 | "less": "^3.0.4", 10 | "next": "latest", 11 | "react": "^16.4.0", 12 | "react-dom": "^16.4.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/with-next-less/pages/index.js: -------------------------------------------------------------------------------- 1 | // Without CSS Modules 2 | import '../style.less' 3 | export default () =>
    Hello Less!
    4 | 5 | // With CSS Modules 6 | /* 7 | import style from '../style.less' 8 | export default () =>
    Hello Less!
    9 | */ 10 | -------------------------------------------------------------------------------- /examples/with-next-less/style.less: -------------------------------------------------------------------------------- 1 | @theme: red; 2 | 3 | .example { 4 | color: @theme; 5 | } 6 | -------------------------------------------------------------------------------- /examples/with-next-page-transitions/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Link from 'next/link' 3 | 4 | const Index = () => ( 5 |
    6 |

    Hello, world!

    7 | 8 | About us 9 | 10 |
    11 | ) 12 | 13 | export default Index 14 | -------------------------------------------------------------------------------- /examples/with-next-routes/pages/about.js: -------------------------------------------------------------------------------- 1 | import { withRouter } from 'next/router' 2 | 3 | const About = ({router}) =>

    About foo {router.query.foo}

    4 | 5 | export default withRouter(About) 6 | -------------------------------------------------------------------------------- /examples/with-next-routes/routes.js: -------------------------------------------------------------------------------- 1 | const nextRoutes = require('next-routes') 2 | const routes = module.exports = nextRoutes() 3 | 4 | routes.add('blog', '/blog/:slug') 5 | routes.add('about', '/about-us/:foo(bar|baz)') 6 | -------------------------------------------------------------------------------- /examples/with-next-sass/next.config.js: -------------------------------------------------------------------------------- 1 | const withSass = require('@zeit/next-sass') 2 | module.exports = withSass() 3 | -------------------------------------------------------------------------------- /examples/with-next-sass/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "next", 4 | "build": "next build", 5 | "start": "next start" 6 | }, 7 | "dependencies": { 8 | "@zeit/next-sass": "^1.0.0", 9 | "next": "latest", 10 | "node-sass": "^4.7.2", 11 | "react": "^16.2.0", 12 | "react-dom": "^16.2.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/with-next-sass/pages/index.js: -------------------------------------------------------------------------------- 1 | import '../styles/style.scss' 2 | 3 | export default () => 4 |
    5 | Hello World! 6 |
    7 | -------------------------------------------------------------------------------- /examples/with-next-sass/styles/style.scss: -------------------------------------------------------------------------------- 1 | $color: #2ecc71; 2 | .example { 3 | background-color: $color; 4 | } 5 | -------------------------------------------------------------------------------- /examples/with-noscript/components/Noscript.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOMServer from 'react-dom/server' 3 | 4 | export default function Noscript (props) { 5 | const staticMarkup = ReactDOMServer.renderToStaticMarkup(props.children) 6 | return