1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples
Adam Lane c4b9e079bf Add example of getInitialProps to with-reasonml (#5975)
The current reasonml needs an example of how to do getInitialProps.  tmepple posted the only known way of doing it in [this comment](https://github.com/zeit/next.js/issues/4202#issuecomment-439175214).   It is unlikely reasonml users are going to discover that comment or figure it out on their own so having it in an example is critical. 

Also, dependencies updated.  After updating dependencies, I get this error:
```
ModuleBuildError: Module build failed (from ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js):
[1] Error: Cannot find module '@babel/core'
[1]  babel-loader@8 requires Babel 7.x (the package '@babel/core'). If you'd like to use Babel 6.x ('babel-core'), you should install 'babel-loader@7'.
```
Seems like @babel/core is required as peer dependency per [this comment](https://github.com/babel/gulp-babel/issues/124#issuecomment-326853222) so I added it.

The way to do getInitialProps has changed in 7.0.2 canary so this also has a comment in the code about what change is required to get that working.
2019-01-02 11:43:19 +01:00
..
active-class-name Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
analyze-bundles Corrects Typo from next-bundle-analyzer/readme.md (#5939) 2018-12-23 19:59:51 +01:00
basic-css #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
basic-export Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-charset Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-actionhero Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-express Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-fastify Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-hapi Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-koa Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-micro Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-nodemon Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
custom-server-polka Fix linter (#5350) 2018-10-20 17:00:01 +02:00
custom-server-typescript Fix/update "examples/custom-server-typescript" (#5865) 2018-12-12 11:04:39 +01:00
data-fetch Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
form-handler Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
gh-pages Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
head-elements #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
hello-world Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
layout-component Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
nested-components Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
only-client-render-external-dependencies Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
page-transitions Remove page-transitions example 2018-05-25 14:19:40 +02:00
parameterized-routing Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
pass-server-data Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
progressive-render Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
root-static-files Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
shared-modules Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
ssr-caching Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
svg-components Use more recent version of svg plugin (#5788) 2018-12-10 14:45:15 +01:00
using-inferno Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
using-nerv Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
using-preact Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
using-router Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
using-with-router Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-absolute-imports Simplify with-absolute-imports example (#5812) 2018-12-04 16:38:39 +01:00
with-algolia-react-instantsearch Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-amp Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-ant-design Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-ant-design-less Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-antd-mobile Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-aphrodite Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-apollo Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-apollo-and-redux Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-apollo-and-redux-saga Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-apollo-auth Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-app-layout Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-asset-imports Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-babel-macros Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-carbon-components Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-carlo Add with-carlo example (#5930) 2018-12-21 09:56:36 +01:00
with-cerebral Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-cloud9 Run yarn lint —fix 2018-10-20 19:37:42 +02:00
with-componentdidcatch #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
with-configured-preset-env Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-context-api Add with-context-api example (#5154) 2018-09-14 12:04:29 +02:00
with-cookie-auth Example with cookie auth (#5821) 2018-12-14 23:05:54 +01:00
with-custom-babel-config Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-custom-reverse-proxy Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-cxs Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-data-prefetch Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-docker Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-dotenv Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-draft-js Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-dynamic-app-layout Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-dynamic-import Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-electron Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-emotion Update react and react-dom to use "latest" (#5942) 2018-12-24 11:24:25 +01:00
with-emotion-fiber Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-external-scoped-css Deprecate css examples 2018-01-31 11:19:34 +01:00
with-external-styled-jsx-sass Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-fela Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-firebase-authentication Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-firebase-cloud-messaging firebase cloud messaging example (#5689) 2018-11-25 16:37:34 +01:00
with-firebase-hosting Update/fix "examples/with-firebase-hosting" (#5853) 2018-12-11 11:45:58 +01:00
with-firebase-hosting-and-docker Fix linting 2018-12-10 22:05:53 +01:00
with-firebase-hosting-and-typescript Update/fix "examples/with-firebase-hosting-and-typescript" (#5864) 2018-12-11 23:24:18 +01:00
with-flow Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-freactal Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-glamor remove <title> in _document.js in examples (#5679) 2018-11-15 16:31:56 +01:00
with-glamorous Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-global-stylesheet Remove with-global-stylesheet example (#4913) 2018-08-07 18:36:28 -07:00
with-global-stylesheet-simple Remove with-global-stylesheet example (#4913) 2018-08-07 18:36:28 -07:00
with-google-analytics Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-hashed-statics Merge branch 'canary' 2018-09-19 18:15:57 +02:00
with-higher-order-component Lint examples (#4985) 2018-08-20 08:31:24 +02:00
with-immutable-redux-wrapper Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-ioc Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-jest Remove outdated note from with-jest example (#5820) 2018-12-05 11:34:40 +01:00
with-jest-react-testing-library Add react-testing-library example (#5940) 2018-12-23 23:23:16 +01:00
with-jest-typescript Fix with-jest-typescript example to keep babel-jest in sync with jest (#5941) 2018-12-23 21:55:35 +01:00
with-kea Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-loading Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-markdown Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-material-ui docs: removes npx info & moves src link up (#4972) 2018-08-19 22:26:50 +02:00
with-mdx Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-mobx fix: update with-mobx example (#5936) 2018-12-23 11:20:27 +01:00
with-mobx-state-tree Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-mobx-state-tree-typescript mobx-state-tree examples should use _app (#5362) 2018-10-14 10:04:58 +02:00
with-mocha add mocha example (#5182) 2018-09-17 00:12:39 +02:00
with-next-css Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-next-i18next Add next-i18next as the solution to integrate i18next into next.js (#5761) 2018-11-28 20:39:54 +01:00
with-next-less Remove <link ...style.css"> from Head in _document (#5890) 2018-12-15 02:57:33 +01:00
with-next-page-transitions #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
with-next-routes Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-next-sass Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-noscript Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-now-env #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
with-pkg Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-polyfills Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-portals Fix bug report with-portals example #5694 (#5714) 2018-11-21 09:25:00 +01:00
with-prefetching Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-pretty-url-routing Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-ga Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-helmet Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-intl Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-jss Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-md Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-native-web Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-relay-network-modern Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-toolbox Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-useragent Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-uwp Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-react-with-styles Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-reasonml Add example of getInitialProps to with-reasonml (#5975) 2019-01-02 11:43:19 +01:00
with-rebass Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-recompose Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-redux Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-redux-code-splitting Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-redux-observable Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-redux-reselect-recompose Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-redux-saga Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-redux-wrapper Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-reflux Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-refnux Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-relay-modern Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-relay-modern-server-express Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-rematch Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-scoped-stylesheets-and-postcss Deprecate css examples 2018-01-31 11:19:34 +01:00
with-segment-analytics Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-semantic-ui Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-sentry Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-shallow-routing Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-sitemap-and-robots-express-server Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-sitemap-and-robots-express-server-typescript Add with-sitemap-and-robots-express-server-typescript example (#5076) 2018-09-03 16:43:19 +02:00
with-slate Add slate.js example (#4899) 2018-08-06 21:00:31 -07:00
with-socket.io Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-static-export Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-storybook #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
with-strict-csp Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-strict-csp-hash Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-style-sheet Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-styled-components Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-styled-jsx-plugins #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
with-styled-jsx-postcss Make styled-jsx configurable (#3050) 2017-10-15 19:54:57 +02:00
with-styled-jsx-scss #4751 - Explicitly mention install when cloning examples (#4758) 2018-07-11 23:56:15 +02:00
with-styletron Update styletron example (#5879) 2018-12-13 17:23:06 +01:00
with-sw-precache Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-tailwindcss Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-ts-node Added with-ts-node with Next js 7 example (#5204) 2018-09-28 21:18:50 +02:00
with-typescript Examples: fix <title> warning in the TypeScript example (#5549) 2018-10-29 19:32:01 +01:00
with-typestyle Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-typings-for-css-modules Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-universal-configuration-build-time Modify with-universal-configuration example (#4498) (#5948) 2018-12-26 20:19:31 +01:00
with-universal-configuration-runtime Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-unstated Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-url-object-routing Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-videojs Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-webassembly Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-webpack-bundle-analyzer Add analyze bundles example (#5332) 2018-10-01 01:24:27 +02:00
with-webpack-bundle-size-analyzer Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-yarn-workspaces Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00
with-zones Add prettier for examples directory (#5909) 2018-12-17 17:34:32 +01:00