Commit graph

1728 commits

Author SHA1 Message Date
Nikolay Stoynov
58aa576bc1
Update README.md (#15198)
Continuation of #15177
2020-07-15 15:03:19 -05:00
Ruslan Dzyubanov
893e57d29e
Update examples/with-apollo (#15178)
apollo-client 2.6.8 -> 3.0.0
2020-07-15 18:23:22 +00:00
Jacky Efendi
fc082b923e
Mark preact as externals for server bundle (#15110)
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
2020-07-15 11:55:43 -04:00
Midnight
987d29a5b4
fixed prettier --write args in package.json (#15187)
prettier --write **/*.{js,ts,tsx} does not work as intended, it never does traverse all files with js,ts,tsx extension. For it to work as intended, extension args should be wrapped in quotes like this "**/*.{js,ts,tsx}"
2020-07-15 14:39:27 +00:00
Nikolay Stoynov
283a0d9a90
Fix with-expo-typescript install command (#15177)
It was using the non-typescript version
2020-07-15 14:20:32 +00:00
Lukas Polak
b088881a5d
update/with-react-jss (#15156)
Use hooks with jss
2020-07-14 13:26:30 +00:00
Jesse Jafa
cb96da13a0
Removed React import from pages/index.js (#15144)
This should close https://github.com/vercel/next.js/issues/12964 but I'm leaving it up to one of the Tims (or if there are other maintainers) to close the issue as they see fit.
2020-07-14 04:59:24 +00:00
abhik-b
583d1a0a02
Updated useUser.js (#14974)
UPDATE I ADDED:
setUser() 
AFTER REMOVING cookie IN return STATEMENT OF logout ARROW FUNCTION

There might be some cases where you do not want to redirect users after logout rather let them remain in that same page BUT let them know they have logged out by some UI changes .

For that cases you might need the 'user' hook to update when users logs out .

CURRENTLY the 'user' hook DOES NOT UPDATE AUTOMATICALLY when the user logs out . 
PAGE REFRESH NEEDED to update that.

So i propose that we might add setUser() to update user so that  user never returns true until user is set some value again
2020-07-13 23:43:21 +00:00
Anthony Morris
5460abf2d4
[Examples] Add .next to .gitignore (#15088)
The TypeScript blog starter didn't have `.next` in the `.gitignore` file.
2020-07-12 20:01:59 +00:00
Jens Meindertsma
164896503c
Update dependencies for with-iron-session example (#15065)
Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-07-12 21:24:52 +02:00
Cristian Bote
f3f9950b3c
(chore) Add with-goober as an example (#15070)
* (chore) Add with-goober as an example

* (chore) Added better documentation

* Updated package json

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-07-10 19:39:35 -05:00
Steph Query
b92ef63314
Update README.md in Emotion starter example (#15035)
Sorry if I'm mixed up here. Was trying to install this and realized the folder is just `/with-emotion`. Guessing this was merged to overwrite the pre-v10 example project.
2020-07-10 18:11:14 +00:00
Ricky Abell
a1f7186658
Fix download instructions in with-next-auth example (#15028)
Download instructions in examples/with-next-auth/README.md currently fail because they refer to next-auth instead of with-next-auth.
2020-07-09 21:23:24 +00:00
JP Lew
f53ee47b73
[cms-wordpress] Nest one-to-one relationships (#15007)
There is a bug in the cms-wordpress example due to a Wordpress plugin dependency. After running `npm install`, then either `npm run dev` or `npm run build`, the following errors appear in the console:

```shell
> cms-wordpress@1.0.0 dev /Users/jplew/Sites/projects/next.js/examples/cms-wordpress
> next

ready - started server on http://localhost:3000
info  - Loaded env from /Users/jplew/Sites/projects/next.js/examples/cms-wordpress/.env.local
event - compiled successfully
event - build page: /
wait  - compiling...
event - build page: /next/dist/pages/_error
event - compiled successfully
[
  {
    message: 'Cannot query field "name" on type "NodeWithAuthorToUserConnectionEdge". Did you mean "node"?',
    extensions: { category: 'graphql' },
    locations: [ [Object] ]
  },
  {
    message: 'Cannot query field "firstName" on type "NodeWithAuthorToUserConnectionEdge".',
    extensions: { category: 'graphql' },
    locations: [ [Object] ]
  },
  {
    message: 'Cannot query field "lastName" on type "NodeWithAuthorToUserConnectionEdge".',
    extensions: { category: 'graphql' },
    locations: [ [Object] ]
  },
  {
    message: 'Cannot query field "avatar" on type "NodeWithAuthorToUserConnectionEdge".',
    extensions: { category: 'graphql' },
    locations: [ [Object] ]
  }
]
Error: Failed to fetch API
    at fetchAPI (webpack-internal:///./lib/api.js:31:11)
```

The reason for this is `wp-graphql` released version v0.10.0 ten days ago which introduced a number of breaking changes (https://github.com/wp-graphql/wp-graphql/releases/tag/v0.10.0). Specifically, this is the change that breaks the current example:

> - One to One relationships are now nested. For example post.author and post.featuredImage now return an edge/node instead of the node directly.

More info about this change can be found here: https://github.com/wp-graphql/wp-graphql/issues/347#issuecomment-639071772

After my changes, `npm run dev` and `npm run build` succeed without errors.
2020-07-09 10:03:13 +00:00
Luis Alvarez D
731cfa46f9
[cms-sanity] Expose the project id to the browser (#14941)
Fixes #14792
Closes #14814

The project id is currently used by Sanity's image builder, which is used in a React component.

@maybac It was faster for me to create a new PR but the credit goes to you, thank you!.
2020-07-08 15:01:20 +00:00
Darsh Patel
1cd6bb5b92
Fix: Destructuring error in the cms-contenful example (#14970) 2020-07-08 13:40:19 +02:00
Christian Alfoni
913d23bf8d
with-stitches-styled: Update package.json (#14958) 2020-07-08 09:46:04 +00:00
Gianmarco
3fa5e589be
Updates thre three-js example with drei and modules transpilation (#14864)
Hi, we received some issues on the `react-three-fiber` and `drei` repos, mentioning broken ssr because of some examples where we import three's examples - like to implement loaders or controls. 

This PR adds a next.config suggested by many that transpiles everything in three, drei and postprocessing.

I also added some code from `drei` that shows how controls and effects can be easily added.
2020-07-08 07:55:51 +00:00
Arsalan Khattak
5247807da0
Add Prisma.io Examples List (#14917) 2020-07-07 14:21:19 -05:00
Christian Alfoni
38b8ecac9e
Update _document.js (#14936)
Fix key warning
2020-07-07 14:20:27 -05:00
Christian Alfoni
e5f2a05bf5
Update _document.js (#14937)
Fix key warning
2020-07-07 14:20:17 -05:00
Christian Alfoni
d80b46d814
Update package.json (#14938) 2020-07-07 14:20:05 -05:00
Christian Alfoni
957c0bb2eb
with-stitches-styled: Update package.json (#14934) 2020-07-07 19:19:50 +00:00
Tomasz Tunik
015898ef6e
Fix cms-wordpress preview mode for post revisions (#14911)
Preview of existing posts should always return the latest revision so DESC sorting was required. Otherwise, it would always return the oldest revision.

Tested against latest Wordpress and GraphQL plugins on drafts, published, and edited but unpublished changes. The example works great!
2020-07-07 11:16:35 +00:00
Christian Alfoni
974cae686e
Update example: update to new stitches version and api (#14876) 2020-07-07 04:17:07 +00:00
James Mosier
75b25901d0
Update examples React to 16.13.1 (#14899)
Fast Refresh doesn't appear to work with older version (16.8.x) versions of React. I was able to reproduce this via this issue https://github.com/vercel/next.js/issues/14895

I updated all examples I found of React `16.8.x` to `^16.13.1` so that future installs will auto bump to the latest minor version. Previously the pinned version was causing the lock of version.
2020-07-07 03:58:13 +00:00
Lindsey Simon
68f4680549
Update index.js (#14771)
Fix CSS `display` on login link.
2020-07-01 14:40:22 +00:00
muslax
401f1b5560
Update README.md for next-auth-example (#14763) 2020-07-01 11:02:18 +00:00
Luis Alvarez D
bfd1ecc370
Update environment-variables example (#14653)
Updated the example to use server only variables inside `getStaticProps`
2020-06-30 20:36:13 +00:00
Darsh Patel
098d77c316
fix extra char in readme cms-sanity (#14725)
Fix super minor typo in cms-sanity example readme
2020-06-30 15:38:28 +00:00
Darsh Patel
1b5ca78810
Example with Monogdb ReamlWeb (#14555)
Added an Example using MongoDB's Realm-Web SDK 

![Screenshot 2020-06-25 at 5 25 49 PM](https://user-images.githubusercontent.com/11258286/85715292-ebafa680-b708-11ea-98bd-d8d64701f0af.png)


Fixes #14417
2020-06-30 09:50:44 +00:00
ralphilius
2ad0b5ba4a
Fix NextSeo example (#14643) 2020-06-29 22:25:05 +00:00
Arsalan Khattak
6079dc243b
Fetch Data on Runtime (with-MongoDB-mongoose example) (#14674)
Change Data Fetching Method in Example with-mongodb-mongoose
Fetch Data on Runtime (getServerSideProps) rather than Build Time (getStaticProps)
2020-06-29 16:45:24 -04:00
Pascal Pixel
c9bc101df8
[examples/with-three-js] Component with useLoader can use dynamic import (#14648)
The existing example gives an error on every hot reload, perhaps because of the way that an initial `useEffect` hook imports the `GLTFLoader` and it doesn't redo that on hot reload?

Putting the component using the `useLoader` hook in a dynamic import seems to fix this.

Open to better suggestions, this is kind of awkward to use still...
2020-06-29 20:14:58 +00:00
Luis Alvarez D
a04fdc8475
Add Environment Variables Example (#14575)
Closes https://github.com/vercel/next.js/issues/14570
Closes https://github.com/vercel/next.js/issues/14576

- The example features everything on the page in our docs while still being quite simple
- Added a link to it in the documentation
- Deprecated the with-now-env example
2020-06-28 11:57:33 +00:00
S M Mahmudul Hasan
874378dcb5
Add @prefresh/next to dependencies of preact example (#14649)
Add @prefresh/next as dependency

Closes #14607
2020-06-28 11:41:16 +00:00
S M Mahmudul Hasan
09b2a66f49
Tailwind config: also look for .tsx .jsx and .ts (#14621)
Closes: #14595
2020-06-27 11:08:10 +00:00
JJ Kasper
61b68730f8
De-experimentalize custom-routes (#14602)
This moves the custom-routes configs outside of the experimental section to prepare them for being made stable

Fixes: https://github.com/vercel/next.js/issues/14184
2020-06-27 09:18:18 +00:00
matamatanot
87bb11c98c
Remove next-cookies and prop-types (#14579) 2020-06-26 14:55:32 +02:00
Hyeungshik Jung
c8dbc7e572
Add [with-storybook-typescript] example (#14398)
Basically this PR adds Next.js 's default TypeScript setting and integrates [@storybook/preset-typescript](https://github.com/storybookjs/presets/tree/master/packages/preset-typescript) into original [with-storybook](https://github.com/vercel/next.js/tree/canary/examples/with-storybook) example. 

However, I thought it may save time for someone who are planning to use storybook with next.js and TypeScript :)
2020-06-25 15:26:47 +00:00
Nico Domino
fe529c49bf
Add 'with-next-auth' example (#14530)
I accidentally deleted the repo the original PR was based upon haha. 

Anyway, the code was still on my computer so here's a new PR with the same content. 

I addressed the latest comments from @lfades in the old PR (https://github.com/vercel/next.js/pull/14180)

I also updated `next-auth` to `2.1.0` and updated the `<Provider />` component in `_app.js` that needed updating since the latest release.

Let me know if I missed anything else, otherwise I think this should be good to go 👍
2020-06-24 22:24:02 +00:00
Oğuzcan Köse
c690a68b3c
Update index.js (#14528)
* Update index.js

* Update index.js

* Update examples/with-firebase-authentication/pages/index.js

Co-authored-by: Luis Alvarez D <luis@vercel.com>
2020-06-24 16:53:04 -05:00
Vinci Rufus
afa9bab11a
fixing the docker multi-stage build failures (#14513)
It looks like the docker multi-stage file wasn't building, so fixed that and also cleaned up some of the steps
2020-06-24 03:56:41 +00:00
Steven Bell
a9bfe13ae5
Remove unused package in with-apollo-and-redux example (#14507)
Usage of `apollo/react-ssr` was removed when the example moved to SSG.
2020-06-24 01:33:09 +00:00
Luis Alvarez D
b90fa0a3e1
[Examples] Use the vercel CLI for with-zones (#14480)
[ch3480]

Fixes https://github.com/vercel/next.js/issues/14242
Closes https://github.com/vercel/next.js/pull/14264

Updated the readme of the `with-zones` example to use `vercel dev` instead, starting the app independently has some routing issues that don't happen on production (due to `vercel.json`), with `vercel dev` the app will match the production deployment on localhost.
2020-06-23 09:04:34 +00:00
JJ Kasper
051481c55c
Add example for proxying upstream with custom routes (#14374)
As discussed this adds an example to demonstrate how you can achieve proxying upstream requests that didn't match any pages/assets in Next.js which can be helpful in achieving incremental migration
2020-06-22 00:44:04 +00:00
Andres Alvarez
6424e1f1d9
Add A/B Tests and Feature Flags example (#13629)
## Summary
This PR adds a basic example of how [Tesfy](https://tesfy.io/) could be integrated with Next.js. Tesfy is a project that I've working on during quarantine weekends, mainly to learn new stuff and provide **free** and **unlimited** A/B Tests and Feature Flags while keeping a good performance and the library [size](https://bundlephobia.com/result?p=react-tesfy@1.2.1) as small as possible.

The configuration file could be set up using a [web application](https://app.tesfy.io/) (hosted in Vercel 🎉 ) or by your self.

## Implementation
- Created `with-tesfy` folder
- Added two pages `index.js` and `features.js` to show how experiments and features could be used
- The only thing that must be persisted is the `userId`. Used a cookie to save it.
- Uses `getServerSideProps` to fetch the configuration file and get/create the `userId`.

## Screenshots

There are some screenshots from the web application. Where you can easily configure experiments and audiences per project. Teams and features will soon be added.

![Screenshot 2020-06-01 at 15 40 49](https://user-images.githubusercontent.com/6877967/83414811-60e7ce80-a41e-11ea-9e5c-887c66e80c65.png)
![Screenshot 2020-06-01 at 15 41 02](https://user-images.githubusercontent.com/6877967/83414823-66451900-a41e-11ea-885b-b58e78b042bb.png)
![Screenshot 2020-06-01 at 15 41 11](https://user-images.githubusercontent.com/6877967/83414828-6a713680-a41e-11ea-90a8-8d39a17f19a1.png)

This is my first PR! sorry if I made something wrong 😞 . Any feedback is more than welcome. Also I want to thank you all for the awesome work with Next.js ❤️
2020-06-21 23:59:53 +00:00
Sebastian Sycz
76673fd880
Update graphql-hooks with memcache (#14364)
Today the cd4178b53e of graphl-hooks and graphl-hooks-memcache has been released, which fixes the problem with Safari.
2020-06-20 19:40:15 +00:00
Todor Totev
5bed435176
[Examples] Remove getInitialProps from with-cookie-auth-fauna (#13887)
* Remove getInitialProps

* added swr

* Update examples/with-cookie-auth-fauna/pages/profile.js

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* Update examples/with-cookie-auth-fauna/pages/profile.js

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* no longer needed

* new .env support

* redirect if not found

* always use latest next version

* no longer needed

* Updated readme

* Updated profile page

* Fixed readme and added deploy button

Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-06-20 10:59:53 -05:00
Bing Quan
ca49c547d0
Update Algolia's Instant Search Example (#14233)
* Update Algolio's Instant Search Example
- Moved from `getInitialProps` to `getServerSideProps`
- Update Algolio libraries

Co-authored-by: Arsalan Khattak <akkhattak65@gmail.com>

* Shift from SSR to CSR

Co-authored-by: Arsalan Khattak <akkhattak65@gmail.com>
2020-06-18 19:23:02 -05:00
Thor 雷神
0d6b7e95ed
Thor/stripe/add use shopping cart example (#14239)
r? @lfades 
cc @timothyis @dayhaysoos @ChrisBrownie55

* Add [use-shopping-cart](https://github.com/dayhaysoos/use-shopping-cart) example to stripe sample
* Refactor how we instantiate Stripe across the different pages with a `getStripe` singleton pattern.
2020-06-18 22:49:31 +00:00
stefanprobst
279ae19c7e
docs: update links to docs site (#14305)
this updates some links to the docs site to their new location
2020-06-18 09:54:07 +00:00
Darsh Patel
42c309ad37
fix csp errors in with-strict-csp-app example (#14262)
Added proper content security policies in the dev environment 
fixes: #14221
2020-06-18 04:25:15 +00:00
Shu Uesugi
a841d10954
Add c=1 to deploy buttons on CMS Examples (#14293)
Fixes #14291
2020-06-17 23:25:11 +00:00
Vorathep Sumetphong
4152e0cee4
(fix) Missing props key from getServerSideProps (#14255)
Crashes the site
This change fixes the example
examples/with-cookie-auth-fauna/pages/profile.js
2020-06-17 05:59:48 +00:00
Gourav Goyal
335e9d4e8d
Added missing .env.local.example file for with example firebase-authentication-app (#14235)
Added missing .env.local.example file for with example firebase-authentication-app.
I've tested it personally and it is working fine.
2020-06-16 17:30:10 +00:00
João Pedro Schmitz
0e8ed87d20
chore(examples): update next to latest on cms examples (#14230)
Hey guys, thanks for the amazing job you are doing 💜 

This PR fixes a small error I faced when starting a project with Prismic + Next.js.

Since the version on the `cms-prismic` example was fixed to `9.2.3-canary.26` I was having the following error because the example uses the environment variables feature that is for Next.js 9.4+

<img width="1256" alt="Screen Shot 2020-06-16 at 12 13 38" src="https://user-images.githubusercontent.com/26466516/84793626-bc43c000-afcb-11ea-8823-b1dee30dbb00.png">

After updating to the latest version, I could run it successfully.

ps: I also realized that the `cms-contentful` example was also not using the `latest` version, so I decided to update it (I have not tested, but the error certainly will happen).

ps2: if you want to reproduce the error, just create a project using the example and add dummy data on the environment variables, then start the server and access `http://localhost:3000`.
2020-06-16 16:25:20 +00:00
James Mosier
d75da7d91f
Using cross-spawn for cross platform use in with-react-intl (#14231)
[In this Discussion](https://github.com/vercel/next.js/discussions/14220) it appears that trying to build the `with-react-intl` example with a Windows machine throws an error. So instead of using `execFileSync` to execute the command, I used [`cross-spawn` ](https://www.npmjs.com/package/cross-spawn) for better cross platform compatibility.
2020-06-16 15:59:59 +00:00
Darsh Patel
a3ffa2e65f
switch to function component with-react-intl example (#14217)
The example was using class-based component for custom _app, switched to functional component approach.


**Sidenote:** The existing code didn't gave an error when navigated to a new page using the navbar
![Screenshot 2020-06-16 at 2 47 52 PM](https://user-images.githubusercontent.com/11258286/84760988-6cbebd80-afe6-11ea-9b7f-98aca7404895.png)
2020-06-16 11:27:20 +00:00
Ty Mick
725376a9d7
Fix GraphQL Hooks Example Safari bug (#14205)
Fixes #14187, where the [GraphQL Hooks Example](https://github.com/vercel/next.js/tree/canary/examples/with-graphql-hooks), when opened in Safari, doesn't respond to events in production and doesn't load at all in the dev server.

This is caused by [a bug in graphql-hooks-memcache@1.3.2](https://github.com/nearform/graphql-hooks/issues/496), which they've fixed but haven't released the fix yet. So this example fix just temporarily downgrades graphql-hooks-memcache by changing its version range to `1.3.1 || ^1.3.3`.
2020-06-16 08:33:57 +00:00
Arsalan Khattak
8cfa51878a
Update Data Fetching Method (#14190) 2020-06-16 09:59:46 +02:00
Jesse
d3704a66f8
added graphcms (#14026)
* added graphcms

* Updated readme and environment variables

* Removed gitignore

* Updated tailwind config

* Some fixes in pages

* Updated api endpoints

* lint fix

* Updated readme

* Updated og image

* Updated cms examples to include this one

* Added example to docs

* Added preview demo link

* Updated step

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-06-15 12:03:34 -05:00
Darsh Patel
d68afed6ab
Fix: validatePassword function logic [Fixes 14174 ] (#14183)
Updated the `validatePassword` function as mentioned in https://github.com/vercel/next.js/issues/14174#issue-638626374

also fixed the password validation logic in `signIn` function 

Fixes: https://github.com/vercel/next.js/issues/14174
2020-06-15 12:39:12 +00:00
Todor Totev
e4f0848c81
[Example] remove getInitialProps from aws-amplify (#13896)
* Remove getInitialProps

* update package

* Applied requested changes.

* thats essential so im bringing it back

* make sure getstaticprops doesnt throw

* proper versioning

* requested changes

* Updated readme and package.json

* Updated pages

Co-authored-by: Luis Alvarez D <luis@vercel.com>
2020-06-14 18:50:54 -05:00
Robert Valmassoi
05f61b22ad
Fix broken link (#14158) 2020-06-13 23:48:14 +00:00
Alexej Dyschelmann
6163f30ad8
[with-recoil example] use functional form of state updaters for simplicity (#14014)
This is probably a pretty subjective change, but one might argue it less complex and may have minimally less overhead.
2020-06-13 09:04:34 +00:00
Li Ming
c16e0e2be1
fix(example): needs TypeScript support (#14115)
Example:  with-ant-design-pro-layout-less needs TypeScript support.

![image](https://user-images.githubusercontent.com/1228449/84468957-ee4ade80-acba-11ea-9438-e1a0e40493f2.png)
2020-06-12 06:35:00 +00:00
Shu Uesugi
e781c44682
Use envLink for deploy buttons (#14110)
This is a quick fix for https://github.com/vercel/next.js/pull/14053 - the deploy buttons on CMS examples should be using `envLink` for the links.

## Before

<img width="565" alt="Screen Shot 2020-06-11 at 7 23 58 PM" src="https://user-images.githubusercontent.com/992008/84458119-21d52c80-ac19-11ea-9659-df6830fc7584.png">

## After

<img width="570" alt="Screen Shot 2020-06-11 at 7 23 33 PM" src="https://user-images.githubusercontent.com/992008/84458089-1255e380-ac19-11ea-81ff-bc2b58af3ea4.png">
2020-06-12 02:51:19 +00:00
Luis Alvarez D
3f5737eccd
Use the expected import (#14111) 2020-06-11 21:29:26 -05:00
Luis Alvarez D
85543a45f1
Update deploy button in the userbase example (#14107)
Fixes readme updates added in https://github.com/vercel/next.js/pull/14100
2020-06-12 02:23:52 +00:00
Mileta Dulović
f343410773
Fixed Avatar.js component where Strapi CMS would fail when fetching an image (#14084)
I tried creating CMS with ```Strapi``` by following [this README.MD](https://github.com/M1ck0/next.js/tree/canary/examples/cms-strapi). After configuring everything I noticed that app isn't working.

This is error that occured on ```yarn dev```

![image](https://user-images.githubusercontent.com/19279947/84417177-8d1cff80-ac15-11ea-942a-4acf9b9b8bcb.png)

After logging data that is sent to ```<Avatar/>``` component I noticed that ```picture``` is actually an ```Array```.

![image](https://user-images.githubusercontent.com/19279947/84417337-c05f8e80-ac15-11ea-9cf5-a6890bc1744b.png)

After modifying code bellow everything works as it should and CMS works properly.
2020-06-12 01:48:27 +00:00
Matthew Sweeney
7e16f7f43b
Update with-userbase Example (#14100)
This PR updates the `with-userbase` example with the following changes:

- Removes the `vercel.json` file, this is no longer needed with [recent changes](https://vercel.com/docs/v2/build-step#environment-variables).
- Changes the URL of the Deploy Button to use `?env`, `?envLink`, and `?envDescription` query strings, these prompt for environment variables upon import.
- Updates the instructions to reflect the changes made to the import and deployment process.
2020-06-12 01:20:52 +00:00
Jason Miller
d23c22c544
[Examples] Fix using-preact dev mode issues (#14098)
Should fix https://github.com/vercel/next.js/pull/13976#issuecomment-641677695

/cc @monsonjeremy - let me know if this work for you.
2020-06-12 00:59:03 +00:00
Luis Alvarez D
2cd691050a
Add new import flow to CMS examples (#14053)
[ch2502]

- Added new import flow to every CMS example, using the deploy button, and removed `vercel.json`
- Replaced `dotenv` with the new env support in outdated examples
2020-06-11 23:44:23 +00:00
HYUNSANG HAN
7e1d174e8e
Fix route in custom-server-koa example (#14080)
Links of the example about `custom-server-koa` were wrong, so I fixed them.
2020-06-11 18:44:29 +00:00
Todor Totev
c337db8d7e
[Example] remove getInitialProps from aws-amplify-typescript (#13898)
Related to [11014](https://github.com/vercel/next.js/issues/11014)
2020-06-11 18:02:58 +00:00
Todor Totev
6c8b7cde7d
[Examples] remove getInitialProps from with-firebase-authentication (#13895)
Related to [11014](https://github.com/vercel/next.js/issues/11014)
2020-06-11 17:38:29 +00:00
Cristian
1ffc7af36a
[Examples] Update with-chakra-ui (#14035)
* [Examples] Update with-chakra-ui

* Pass theme prop to ThemeProvider

Co-authored-by: Cristian Dominguez <cristiand391@users.noreply.github.com>
2020-06-11 01:34:41 -05:00
Shu Uesugi
30f30af320
Storyblok CMS Example (#13993)
[ch2842]

- Demo: https://next-blog-storyblok.now.sh/
- Preview Mode: https://next-blog-storyblok.now.sh/api/preview?secret=5nnybHTKlbzkOa6r&slug=draft-post-test
2020-06-10 22:23:28 +00:00
Shu Uesugi
dea4c2cbf4
ButterCMS Example (#13908)
[ch2580]

**Demo:** https://next-blog-buttercms.now.sh/
**Preview Mode:** https://next-blog-buttercms.now.sh/api/preview?secret=CdEAKMRT4tAwzqiD&slug=draft-post-test
2020-06-10 17:13:10 +00:00
Darsh Patel
f24eb4fd4a
Added .next folder to gitignore for examples/blog-starter (#14003)
```.next``` folder wasn't in the gitignore file causing .next folder to be tracked by git
2020-06-10 10:09:42 +00:00
Dylan Jhaveri
d5f5b5f29b
with-mux-video update (#13992)
* function rename
* update package.json dependencies to use `^` for semver. I noticed the package-lock.json is not committed in these examples, which seems to be intentional. Is it advisable to use semver for dependencies? This could actually break if someone clones, installs and a newer version of something has a breakage, but in general it might be nice to have folks installing the latest patch releases for deps.
* use Upchunk 2.0.0. with 1000x [better progress reporting on uploads](https://github.com/muxinc/upchunk/releases/tag/v2.0.0)

**Notice the progress %**

Upchunk pre 2.0:

![before-loading](https://user-images.githubusercontent.com/764988/84232581-70fa5080-aaa5-11ea-8db8-2cfe50339b43.gif)

Upchunk 2.0:

![after-loading](https://user-images.githubusercontent.com/764988/84232620-85d6e400-aaa5-11ea-82cc-b348ead1f5de.gif)
2020-06-10 07:05:14 +00:00
Luis Alvarez D
43271821f2
[Examples] Move with-typescript-graphql to SSG (#13854)
Related to https://github.com/vercel/next.js/issues/11014
2020-06-10 04:14:53 +00:00
Luis Alvarez D
9dc902835c
[Examples] Move api-routes-apollo-server-and-client-auth to SSG (#13849)
Related to https://github.com/vercel/next.js/issues/11014

The authentication method has been replaced with an improved version of the passport example.
2020-06-10 03:46:11 +00:00
James Mosier
aed8b37529
Fix variable shadowing in blog-starter example (#13988)
Sorry for the super trivial PR. I noticed this while working with the example and figured it might be worth fixing.
2020-06-10 03:30:22 +00:00
Luis Alvarez D
3a9fbd8396
[Examples] Move with-apollo-and-redux to SSG (#13779)
Ref: https://github.com/vercel/next.js/pull/13742
2020-06-09 21:11:45 +00:00
Jason Miller
f2e29f6ade
[Examples] using-preact: add Prefresh, DevTools & chunking fix (#13976)
This adds [prefresh](https://github.com/JoviDeCroock/prefresh) and [preact/debug + DevTools](https://preactjs.com/guide/v10/debugging/) during development. It also fixes the chunking/splitting configuration for production builds by creating a `preact` chunk based on the existing framework chunk.

I'm still considering publishing the config here as a plugin, since I worry about the copy-paste effect on this much regex-foo.

/cc @jovidecroock
2020-06-09 20:35:52 +00:00
Jayden Seric
9fea9dbe6d
Update the with-graphql-react example (#13928)
- Removed the manual `fetch` polyfill as that is handled automatically by Next.js now.
- Updated dependencies, including [`graphql-react`](https://github.com/jaydenseric/graphql-react) and [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
- Removed `next.config.js` as it’s no longer required for [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
- Renamed the index page component from `Home` to `IndexPage`.
- Tweaked the [`graphql-react`](https://github.com/jaydenseric/graphql-react) bundle size mentioned in the readme.
2020-06-09 18:06:19 +00:00
Wilbert Abreu
d3f0aee0ee
Adding Example: with-recoil (#13380)
Co-authored-by: Wilbert Abreu <wilbert.a.abreu@aexp.com>
Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-06-08 21:33:08 -04:00
Todor Totev
47e2beba20
[Example] Deprecate with-sentry in favor of with-sentry-simple (#13904)
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-06-08 21:32:23 -04:00
Shyam Gupta
506116c7d0
chore: remove-redundant-example-react-import (#13907)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-06-08 21:31:56 -04:00
Luis Alvarez D
258f8c0e4e
[Examples] Move with-react-relay-network-modern to SSG (#13878)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-06-08 21:31:22 -04:00
Luis Alvarez D
b4ec992815
[Examples] Move with-graphql-hooks to SSG (#13858)
Related to https://github.com/vercel/next.js/issues/11014

The setup is very similar to the one used for Apollo examples.

@Joezo I've removed the demo example that you added to the readme (https://github.com/vercel/next.js/pull/6482) as it will be outdated after this PR is merged.
2020-06-08 16:23:34 +00:00
Luis Alvarez D
154c4958b0
[Examples] Move with-relay-modern to SSG (#13882)
Related to https://github.com/vercel/next.js/issues/11014
2020-06-08 15:41:47 +00:00
Akindolie Oluwatayo
b922fe8abf
Update README.md (#13899)
Few text corrections.
2020-06-08 14:12:38 +00:00
not
319b858e77
fix typo in comment (#13883) 2020-06-08 01:03:38 +00:00
Simon Goldin
c61fd50419
update test snapshot in with-typescript-eslint-jest (#13847)
Updating snapshot for https://github.com/vercel/next.js/pull/13732 where the `toMatchSnapshot` expectation moved to another test.
2020-06-07 23:54:16 +00:00
Todor Totev
2ede86ffa9
[Examples] Remove getInitialProps from with-rematch (#13834)
Related to [11014](https://github.com/vercel/next.js/issues/11014)
2020-06-06 16:57:16 +00:00
Luis Alvarez D
792a113d48
[Examples] Move api-routes-apollo-server-and-client to SSG (#13782)
Ref: https://github.com/vercel/next.js/pull/13742
2020-06-06 13:04:52 +00:00
Shu Uesugi
1935196e5e
Prefer docs site for documentation links in CMS examples (#13826)
[ch579]

Some README files in `examples/cms-*` were linking to a documentation markdown file inside the repo (e.g. `/docs/basic-features/pages.md`) instead of the documentation website. We should always link to the documentation website from an example README file because (1) the website has better UX and (2) as we’re creating the examples pages on `next-site` (https://github.com/vercel/next-site/pull/672), we’d like to avoid extra processing of markdown content.
2020-06-06 00:23:20 +00:00
Dan Williams
2c8ab89e37
Fixed graphql-hooks example data prefetch (#13799)
- Fixes the Next.js `with-graphql-hooks` example so that data is prefetched during SSR:
    - The example was using an old version of `graphql-hooks` where SSR was broken
    - It had a bug where the `graphql-hooks` client passed in to the `AppTree` as a prop was not being used (instead was creating a new client every time)

This resolves https://github.com/nearform/graphql-hooks/issues/439 for `graphql-hooks`.
2020-06-05 17:11:40 +00:00
Todor Totev
b12f5a2669
[Examples] Remove React.FC from with-stripe-typescript (#13803)
Related to [this](https://github.com/facebook/create-react-app/pull/8177).

Let me know if you want me to change something.
2020-06-05 16:17:36 +00:00
Todor Totev
097287489f
[Examples] Refactor with-electron-typescript (#13802)
Related to [11014](https://github.com/vercel/next.js/issues/11014).

Removed getInitialProps in favor of getStaticProps and getServerSideProps. Refactored one of the components from class to functional. Removed redundant imports. Removed React.FC/FunctionComponent. Added two build files to gitignore.

Let me know if you want something to be changed.
2020-06-05 16:00:10 +00:00
Luis Alvarez D
2d2c7626e3
[Examples] Move with-apollo to SSG (#13742)
Based on https://github.com/vercel/next.js/pull/13607 - I created a new PR as I can't push changes to the initial PR.

Migrated the Apollo client to use SSG, also removed the link to the live demo because I don't know who the owner is or how to update the deployment.

The implementation is pretty simple and will be added to all the other Apollo examples
2020-06-05 15:41:42 +00:00
Todor Totev
22b2920aac
enhance-with-redux-saga (#13764)
[11014](https://github.com/vercel/next.js/issues/11014)

Removed getInitialProps from _app
2020-06-05 14:59:13 +00:00
Todor Totev
4d7b3fdf98
[Examples] Refactor with-electron (#13800)
Not much happening, the main page was converted from class to functional component.
2020-06-05 14:41:03 +00:00
Todor Totev
88fd6cf31d
[Examples] Removed React.FC/FunctionComponent from with-typescript (#13798)
Related to [this](https://github.com/facebook/create-react-app/pull/8177).

Let me know if you want me to change something.
2020-06-05 10:40:37 +00:00
Todor Totev
0175b98928
[Examples] Removed React.FC from blog-starter-typescript (#13797)
Related to [this](https://github.com/facebook/create-react-app/pull/8177).

Let me know if you want me to change something.
2020-06-05 10:15:55 +00:00
Adam Zacharski
f37c00279b
Fix sample command (#13789)
dev doesn't seem to exist
2020-06-05 03:18:48 +00:00
Allen Hai
87f9f91187
Update to modern env handling for userbase example (#13774)
This PR removes the `next.config.js` file and renames the environment variable in `vercel.json` to use the new `NEXT_PUBLIC` prefix.
2020-06-05 00:50:56 +00:00
Joe Haddad
4a12fb0a5f
Normalize example gitignores (#13768)
This removes a bunch of unnecessary `.gitignore`s and fixes some CMS examples that don't ignore `node_modules` etc.
2020-06-04 20:39:52 +00:00
Jazib Sawar
6ce7a0378e
CMS Cosmic Example (#13499)
* Add Cosmic CMS Example

* with native .env support, this file isn't needed anymore

* FIX use path alias

* Add cosmicjs package

* Fix alias import in pages/api/preview

* Added: react-imgix & lazysizes package

* Load lazysizes in layout

* Used imgix image with lazyloading

* Added avatar imgix optimizations

* EDITED: steps to install content, preview

* EDITED: demo link

* EDITED: Install step

* EDITED: preview link steps

* Edited: demo link

* FIXED: object_slug

* Screenshots

* Fixed object_slug link

* Update README.md

* Fix: formatting issue

* Updated readme and renamed .env to env.local

* Sanity checks

* Handle fallback data when expected

* Added link to the example in other examples

* Updated demo deployment

* Added example to docs

* minor lint fix

* Remove manual download step

* use vercel.json

Co-authored-by: Tony Spiro <tspiro@tonyspiro.com>
Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-06-04 15:18:11 -05:00
Joe Haddad
8287ed233d
Replace dotenv example (#13770)
This removes the `with-dotenv` example in favor of a README that directs users to the docs.
2020-06-04 18:18:09 +00:00
Vincent Voyer
d8f2f8166e
examples(iron-session): update fetch, env, UI, deps, and docs (#13756) 2020-06-04 13:12:52 -04:00
Todor Totev
dbe5973fae
[Example] with-typescript-types (#13746)
Closes [7882](https://github.com/vercel/next.js/issues/7882).
Created as requested by @timneutkens 

I'm unsure if that's exactly what you wanted, so let me know what you want me to change and I'll do it asap.
2020-06-04 16:25:28 +00:00
Timothy
d1c16124b5
Update instances of Now to Vercel where applicable (#13760)
This pull request renames various instances of `now` to `vercel` etc. in order to match content that's being updated on the Vercel platform.
2020-06-04 14:57:17 +00:00
Shu Uesugi
c02d86ec52
Docs: Add supported browsers and features (#13741)
[ch1981]

Add the “Supported Browsers and Features” page. The content is taken mostly from the blog posts: [9.4](https://nextjs.org/blog/next-9-4), [9.3](https://nextjs.org/blog/next-9-3), and [9.1.7](https://nextjs.org/blog/next-9-1-7).

- This page is added under “Basic Features” on the sidebar.
- It still links to `with-polyfills` example, but [this example was updated recently](04fbe0b756). I simplified the README.
- Removed the FAQ section on supported browsers.
- On ["Customizing Babel Config"](https://nextjs.org/docs/advanced-features/customizing-babel-config), remove the list of presets which were outdated and instead link to [the preset file](https://github.com/vercel/next.js/blob/canary/packages/next/build/babel/preset.ts) so it’s always up to date.
2020-06-04 10:15:34 +00:00
Giulio Fagioli
00eef1720c
Update Firebase Auth Example for New Env Support (#13587)
Prefixed variables name with NEXT_PUBLIC_.

Solving #13585 issue related to get undefined from process.env.VARNAME inside .env* files.

I'm not secure if SESSION_SECRET_* need the prefix.
2020-06-04 07:01:22 +00:00
Todor Totev
16300db182
with-videojs fix (#13745)
Closes [13730](https://github.com/vercel/next.js/issues/13730)

Brought back the ref implementation.
Added another component that uses just the videojs-youtube package
2020-06-04 06:41:46 +00:00
Filipe Marins
42140bd1d8
Update test description of with typescript eslint jest example (#13732)
The tests was with description changed
2020-06-03 21:43:53 +00:00
Todor Totev
34f82a996b
Refactor with redux observable (#13615)
Related to [11014](https://github.com/vercel/next.js/issues/11014)

1. Moved the reducer into the store and created new store file
2. The example was using a server that was no longer available, now it uses JSON placeholder instead.
3. Moved from getInitialProps to getStaticProps
4. Refactored all the classes to functional components, using the new redux hooks API.
5. Upgraded all the packages and using custom redux wrapper instead of next-redux-wrapper, which I have removed from the example.
6. Upgraded all the other packages.

Please, let me know if I should change anything.
2020-06-03 09:23:16 +00:00
Tyler Evans
066f694133
example(chakra-ui): pass through pageProps in custom app (#13690)
Took me a while to figure out why the simple data fetching examples weren't working in my project, which I based off this template. Here's the fix.
2020-06-03 02:44:25 +00:00
Luis Alvarez D
ef22a8b7c5
[Examples] Add missing cms links (#13683)
This was a change that I forgot to push into the Agility CMS example PR, adding it now.
2020-06-02 17:36:12 +00:00
Joe Haddad
d650da0623
Remove refs to old css experiment (#13673)
Removes some dangling references to non-existent experimental options.
2020-06-02 16:57:35 +00:00
Tim Neutkens
31b3e46b8f
Use inclusive naming for variables / examples (#13657)
https://twitter.com/vercel/status/1267650234236252161

The variables for the launchEditor feature were kept consistent with Create React App so it's probably a good idea for them to change them too: https://github.com/facebook/create-react-app/search?q=WINDOWS_FILE_NAME_WHITELIST

Prior discussions on this topic:
- https://github.com/hashicorp/consul/issues/7901
- https://github.com/styled-system/styled-system/issues/391
- https://github.com/go-sql-driver/mysql/pull/1116
- https://github.com/lagom/lagom/issues/2532
- https://github.com/grafana/grafana/issues/18841
2020-06-02 13:52:41 +00:00
James Vidler
7c203b80c9
Added Agility CMS example 🏆 (#12788) 2020-06-02 01:49:04 +00:00
Kirill Konshin
65f0574c16
Update with-redux-wrapper example (#13649)
Follow up for #11802

Makes sure app is not opted out of Automatic Static Optimization.
2020-06-02 00:13:38 +00:00
Shu Uesugi
d60fada097
CMS Strapi Example (#12701)
* Strapi Example

* Fix og image URL

* Remove next.config.js

* Apply updates

* Remove API_URL

* Bugfixes

* Finish Strapi README

* Deploy Strapi

* Add strapi examples

* now →  vercel [ch1796]

* Use npx

* Minor readme update

* Prettier fix

Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-06-01 18:49:43 -05:00
Luis Alvarez D
ad24a0c855
[Examples] Add WordPress Blog (#13194)
* Added most of the stuff

* Updated pages

* Removed unrequired deps

* API fixes

* Fixes fixes and updated readme

* Updated og image

* Added demo and links to example

* Updated packages

* update name. bump dependencies

* Renamed .env.example to .env.local.example

* Added node_modules to .gitignore

* use recommended config

* enable absolute import/alias support

* remove jsconfig.json

* allow HTML entities in post titles

* add underline to content links

* add basic ul & ol styles

* add code block styles

* add basic text alignment

* add basic image alignment styles

* adjust pre font-size and figcaption

* indent ul,ol lists to line up with grid

* add basic button styles

* add basic file styles

* add basic blockquote style

* add basic audio styles

* add h4 and enhance blockquote styles

* add basic cover block styles

* add basic verse styles

* add basic two-column block styles

* add tags

* add categories

* Only ignore .vercel

The rest is injected by create-next-app

* now → vercel

* npm init → npx

* Wordsmith

* Wordsmith

* Wordsmith

* Wordsmith

* Improve issue link

* Wordsmith

Co-authored-by: Greg Rickaby <greg@gregrickaby.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-06-01 17:17:20 -05:00
Rafael Almeida
2bf8153c27
[with-typescript] Remove React.FC (#13643)
The motivation for this PR is well explained here: https://github.com/facebook/create-react-app/pull/8177
I can expand it to the other examples too if you agree with the change
2020-06-01 20:41:56 +00:00
Todor Totev
795d9319a6
Fix with antd ssg (#13611)
Closes #12664 
Closes #13604 

The culprit was not only changing the library directory, but also having the icons version past 4.0.6. Also, the components which used the library had to be adjusted according to the new changes.

Confirmed that it works both in production and development. Confirmed that it builds on dev and production.

![Alt Text](https://media.giphy.com/media/dZ46aA1Rs7Oi1wSQKU/giphy.gif)
2020-06-01 19:08:59 +00:00
Joe Haddad
7d038dfef1
Suggest npx over npm init (#13637)
This updates old examples to the more universal `npx` command.

Fixes https://github.com/vercel/next.js/discussions/12103
2020-06-01 17:36:57 +00:00
Akhila Ariyachandra
032ca0364d
Updated with-magic example with new Environment Variables Support in Next.js 9.4+ (#13623) 2020-06-01 19:19:48 +02:00
Luis Alvarez D
7a1724f326
[Examples] Remove unused file from with-redux (#13570)
Leftover from a past PR
2020-05-31 21:11:35 +00:00
Martin Bavio
f8f308d6dd
Fix examples using __NEXT_DATA__ (#13567)
This PR fixes https://github.com/vercel/next.js/issues/4883.

It introduces a new global variable (`window.__REHYDRATE_IDS`) only when necessary.

In the case of the `with-react-with-styles` example, rehydration isn't happening, so I removed the creation of the variable. 

In the case of the `with-react-intl` example, the information doesn't seem to be set anymore on `__NEXT_DATA__`, so I just removed the default reference to it.
2020-05-31 20:20:01 +00:00
Todor Totev
11597655d9
Enhance with redux thunk example (#13576)
* Refactored the store so that it doesnt use getInitialProps

* Applied the changes in the _app file

* Refactored the wrapper so that it uses the new store flow

* Removed the old redux syntax

Instead of passing the state from the parent component, I have used the new redux hooks to retrieve the current state.

* The clock no longer requires state to be passed too

* Updated the variable names

* forgot to bring back hot reloading

* Applied requested change.
2020-05-31 11:53:01 -05:00
Todor Totev
bb23d37b28
Enhance with redux persist (#13577)
* Moved the state to the clock component

* Refactored the store according to the new requirements

* Refactored _app so it uses the new store

* This file is no longer needed

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-05-30 13:00:37 -05:00
Thor 雷神
ca816df4de
Stripe example updates (#13581)
- Update to latest stripe-node version and pin the exact version so the Types won't go out of sync
- Add the env var changes for next 9.4.4 (https://nextjs.org/blog/next-9-4#new-environment-variables-support)
  - Remove `next.config.js` as no longer needed.
- Add the Deploy to Vercel button
2020-05-30 17:32:36 +00:00
MichelleLucero
3dbddfa02a
[ EXAMPLES ] Added with-mongodb example (#13028)
* created with-mongodb, Next.js + MongoDB

Co-authored-by: Shania Dhani <31454777+sdhani@users.noreply.github.com>
Co-authored-by: Michelle Lucero <31500626+MichelleLucero@users.noreply.github.com>
Co-authored-by: Chi Shing Lee <60354073+chislee0708@users.noreply.github.com>

* Update examples/with-mongodb/README.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>

* modified for dotenv and environment var setup

* removed extra instructions on readme, linked it to the MongoDB guides

* changes to environment var

* replaced document with react logic

* removed Pet header

* removed isomorphic-unfetch

* replaced getInitialProps with getStaticProps (SSG)

* removed console log

* deleted next.config.js file

* fixed prettier styling

* fixed link 404 server rendering issue

* modified server path for delete/edit

* fixed prettier styling

* fixed a typo

* change .env to .env.local

Co-authored-by: Joe Haddad <timer150@gmail.com>

* fixed typo, change .env to .env.local

Co-authored-by: Joe Haddad <timer150@gmail.com>

* change .env to .env.local

Co-authored-by: Joe Haddad <timer150@gmail.com>

* Update examples/with-mongodb/package.json

Co-authored-by: Joe Haddad <timer150@gmail.com>

* removed dotenv dev dependency

Co-authored-by: Joe Haddad <timer150@gmail.com>

* cleaned up code and instructions

* Update examples/with-mongodb/.gitignore

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* minor changes to code style and logic

* Updated index page and .env.local.example

* Updated new page

* Don't use SSG for the edit page

* Fixed revalidation issue

* Use es6 for the model

* Updated edit page

* Removed VERCEL_URL

* Updated readme and renamed env

* Added temporal vercel.json

* Removed seed until added with a script

* Updated package.json

* Renamed example in readme

* Renamed example

* Lint fix

Co-authored-by: liulanz <zhengliulan@gmail.com>
Co-authored-by: Shania Dhani <31454777+sdhani@users.noreply.github.com>
Co-authored-by: Chi Shing Lee <60354073+chislee0708@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: sdhani <shania.dhani46@myhunter.cuny.edu>
Co-authored-by: liulanz <37808313+liulanz@users.noreply.github.com>
Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-05-30 12:15:00 -05:00
Martin Bavio
2a473ab42c
Make Linaria great again (#13568)
This PR fixes https://github.com/vercel/next.js/issues/7769.

However, I would like for @jayu to confirm that it's ok to use the latest Linaria 2.0 alpha release. I can confirm from my local testing that it's working as expected.
2020-05-30 00:05:49 +00:00
Michael Albertz
44fbc24ccd
[Example] Add with-web-worker example (#13444)
Resolves: https://github.com/zeit/next.js/issues/12545

This PR adds an example which show how to bundle and use WebWorkers in a next.js app.

The issue mentions Typescript, but adding typescript to the example should be fairly simple by following the documentation and seems out of scope for a web-worker example.
2020-05-28 23:07:23 +00:00
Aral Roca Gomez
6b65efb624
Fix typo (#13523)
Fix a typo.
2020-05-28 22:29:54 +00:00
Rubén Sospedra
8d97353d38
Add example with next-translate (#13511)
Motivated by the need to deploy static sites while having a good i18n support¹ ² @vinissimus developed [next-translate](https://github.com/vinissimus/next-translate).

Here's the example ;)

References:
1. https://github.com/vercel/next.js/discussions/10651
2. https://github.com/vercel/next.js/pull/12535#issuecomment-624317275
2020-05-28 21:31:05 +00:00
Mathis Chenuet
16d2235882
Update proxy example to http-proxy-middleware ^1 (#13507)
The current example doesn't work if one try to reproduce it with a recent version of http-proxy-middleware.
2020-05-28 21:00:58 +00:00
Joe Haddad
db5b5a76a8
Update some examples to Vercel (#13477)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-05-28 13:32:29 +02:00
Chandu
5eafc1e92a
refactor(with-redux): update example to use getStaticProps (#13378)
@lfades hope this works. I have updated the example to show differences between client/ssr/ssg initial state in redux. Let me know if something needs to be changed.
2020-05-28 05:12:27 +00:00
Joe Haddad
b7e17e09e5
Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
Jimmy Merritello
001230e0a8
Add Route as Modal Page Example (#12945)
### Add dynamic routes to _with-route-as-modal_ example

This PR adds [dynamic routes](https://nextjs.org/docs/routing/dynamic-routes), [getStaticPaths](https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation), and [getStaticProps](https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation) to the **with-route-as-modal** example. This change might also clear up some confusion here on https://github.com/zeit/next.js/issues/11971

Additionally this PR makes sure each modal route is also a modal **page.**

This is an important distinction and makes sure the experience is the same should the URL (route) be shared as a link. In other words, `index.js` need not be the only "entrypoint" to browsing the website.

With the additions in this PR, each post page is an actual page, so if you were to share the link for **Post 3** you'd get this:

<img src="https://user-images.githubusercontent.com/7191639/82058282-25ad7780-968a-11ea-94f1-9b4a36abccf9.png" width="200px" />

(clickable outer region brings you back to the 'gallery')

**Update:** I have also included the `pathname` to signal the difference in which page component is rendered

Rather than this (previously):

<img src="https://user-images.githubusercontent.com/7191639/82058199-0878a900-968a-11ea-97d2-e9e20c9267fc.png" width="200px" />

I have used a similar approach [here 🔗](https://hashiconf.com/digital-june/schedule/the-hitchhikers-guide-to-terraform-your-infrastructure)
2020-05-27 21:22:33 +00:00
Stephen Cefali
d98cd8ad31
Add release argument to SentryWebpackPlugin (#13459)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-27 14:28:02 -04:00
JJ Kasper
1f6ce106ae
Update codeload and deploy links for org rename (#13141)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-27 14:11:39 -04:00