Commit graph

2816 commits

Author SHA1 Message Date
Balázs Orbán
b85bbac338 chore(examples): fix lint 2022-10-01 07:12:41 +02:00
Balázs Orbán
d43deee972 chore(examples): fix lint 2022-10-01 06:59:44 +02:00
Balázs Orbán
3caebdef67
chore(examples): Cosmic cms updates (#41080)
Lands #38163 with merge conflict fixes. Needed to open a new PR, because
GitHub does not allow maintainers to edit organization forks.

https://github.com/orgs/community/discussions/5634

Closes #38163


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: sherazmalik06 <sherazmalik06@gmail.com>
Co-authored-by: Tony Spiro <tspiro@tonyspiro.com>
2022-10-01 06:46:25 +02:00
Balázs Orbán
e875dded8b
chore(examples): add Authsignal passwordless example (#41079)
Lands #39048 with lint fixes. Needed to open a new PR, because GitHub
does not allow maintainers to edit organization forks.

https://github.com/orgs/community/discussions/5634

Closes #39048

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: Chris Fisher <chris.i.fisher@gmail.com>
2022-10-01 06:39:38 +02:00
Angelo Ashmore
3ede313e1f
chore(examples): refresh cms-prismic example (#40121)
## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

**Note**: `pnpm lint` fails on code unrelated to the changes in this PR.

This PR updates the [Prismic](https://prismic.io/) CMS example
(`examples/cms-prismic`) to use the latest Prismic libraries, tools, and
conventions.

- Uses `npx @slicemachine/init` to bootstrap new Prismic accounts and
content repositories.

- Uses [Slice
Machine](https://prismic.io/docs/technologies/slice-machine) to model
content.

- Uses [Slices](https://prismic.io/docs/technologies/slice) to write
post content.

- Uses the latest versions of the following packages:

  - `@prismicio/client`
  - `@prismicio/helpers`
  - `@prismicio/react`
  - `@prismicio/next`

- Adds generated TypeScript types for Prismic content. The example
remains as a JavaScript codebase (i.e. not TypeScript), but makes use of
the types via JSDoc.

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-10-01 06:06:49 +02:00
sanruiz
fd6c90798d
Fix: [slug].tsx in wordpress example (#41074)
Fixing the image URL in the meta property og:image

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-30 15:18:49 -07:00
Henrik Wenz
cae96f27ec
chore: update with-react-intl example (#40999)
## Changes

see commits

## Additional Info

Since this example is quite complex I tried to remove additional noise
(unused type inference).

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

## Related

Closes: #40975
2022-09-30 12:39:51 -07:00
Jamie Barton
9863df3fb2
chore(examples): use correct name in with-xata example (#41063)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

This PR fixes the npm/pnpm/yarn commands to use with-xata instead of Contentful.
2022-09-30 14:27:47 +00:00
Saurabh Burade
92db7f165d
examples/evm-multichain-dapp (#39206)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


The template repository can be found [here](https://github.com/saurabhburade/with-evm-chains)
Public reviews, and improvement suggestions are welcome!
## Supported Blockchains
1. ETHEREUM
2. ROPSTEN
3. RINKEBY
4. GÖRLI
5. KOVAN
6. MATIC
7. MATIC_TESTNET
8. FANTOM
9. FANTOM_TESTNET
10. XDAI
11. BSC
12. BSC_TESTNET
13. ARBITRUM
14. ARBITRUM_TESTNET
15. MOONBEAM_TESTNET
16. AVALANCHE
and more


### Note 
- This template has the flexibility to seamlessly extend to other EVM Blockchains.
- It has web3.js and wallet connection modules.
- It supports blockchain Read and Write functionalities.


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 14:19:54 +00:00
John Carlo Austria
f09c3becbc
chore(examples): Add vanilla-extract example (#41061)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)


Response to #29165


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 14:02:01 +00:00
Avi Avinav
cd04606d11
Add windicss example (#35256)
Adding windicss example.

This is my first pull request to next.js, so I am very sorry if I did something wrong.

## Documentation / Examples

- [X] Make sure the linting passes by running `yarn lint`


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 11:26:26 +00:00
Loren ☺️
05c2fe0b0f
Update examples/with-temporal (#33674)
Update `with-temporal` example to latest version of Temporal TS SDK API.

AFAICT, next.js doesn't yet support `type: "module"` in root `package.json`, so I added a nested `package.json` for Temporal.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 00:53:32 +00:00
Jess Telford
1545af5803
Add Embedded KeystoneJS example (#25351)
## Documentation / Examples

- [x] Make sure the linting passes

See [the `README.md`](https://github.com/jesstelford/next.js/blob/cms-keystonejs-embedded/examples/cms-keystonejs-embedded/README.md)

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 00:45:36 +00:00
Diogo Cardoso
12f7e0d399
chore(examples): update with-mantine (#34591)
[Mantine ](https://mantine.dev/) is a fully featured React components
library.
This PR adds an example of Mantine + Next.js

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-09-30 02:38:56 +02:00
Henrique Holtz
eed539a0bb
[Examples] -> Add external official example with-react-query (#38101)
Add external and official example with
[react-query](https://react-query.tanstack.com/).

Note: [into the
contributing.md#adding-examples](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
don't have any specification to external examples. For example, to new
external examples, I need add some `.gitignore`? I really think that no,
maybe this information can be on the document above....

Another external example:
[with-material-ui](https://github.com/vercel/next.js/tree/canary/examples/with-material-ui)

Thanks,

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-09-29 17:03:51 -07:00
Cupid Valentine
8422f233ef
Add NextUI example (#38209)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-29 23:59:15 +00:00
Kasper Andreassen
88ac118d1c
Add Enterspeed blog example (#35897)
# Demo: https://next-blog-demo.enterspeed.com/

Added `with-enterspeed` to examples.

Linked to `with-enterspeed` in related documentation:
- docs/advanced-features/preview-mode.md
- docs/basic-features/data-fetching/overview.md
- docs/basic-features/pages.md

Linked to `with-enterspeed` in related examples:
- examples/blog-starter/README.md
- examples/cms-agilitycms/README.md
- examples/cms-builder-io/README.md
- examples/cms-buttercms/README.md
- examples/cms-contentful/README.md
- examples/cms-cosmic/README.md
- examples/cms-datocms/README.md
- examples/cms-drupal/README.md
- examples/cms-ghost/README.md
- examples/cms-graphcms/README.md
- examples/cms-kontent/README.md
- examples/cms-prepr/README.md
- examples/cms-prismic/README.md
- examples/cms-sanity/README.md
- examples/cms-storyblok/README.md
- examples/cms-strapi/README.md
- examples/cms-takeshape/README.md
- examples/cms-tina/README.md
- examples/cms-umbraco-heartcore/README.md
2022-09-30 01:48:00 +02:00
Balázs Orbán
335e91800b
chore(examples): remove next-env.d.ts files (#41041)
They are added to `.gitignore` already. Follow-up on #39051


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-29 16:39:47 -07:00
Nicholas Ramkissoon
2af441cfb7
chore(examples): Convert with-react-hook-form example to TypeScript (#38796)
Converted `with-react-hook-form` example to TypeScript as it is pointed out in the contributing docs that examples
should be converted to TS.

- updated dependencies
- fixed/added types where necessary

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-29 23:09:57 +00:00
Atila Fassina
2fa33b351b
Add with-xata example (#39864)
This Pull Request adds a `with-xata` example to use [Xata](https://xata.io) as the data layer of a Next.js app.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-29 22:37:28 +00:00
Balázs Orbán
596148c580
chore(examples): upgrade with-react-native-web dependencies (#41024)
Closes #41010

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-29 14:01:08 +02:00
Miguel Oller
a89d760d60
Update cms-makeswift example (#41005)
Makeswift now uses Next.js' Preview Mode so there's no need for a
preview route. It also supports automatic on-demand revalidation with
the introduction of the Makeswift API handler.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-28 11:33:08 -07:00
JJ Kasper
242bf65f98
Revert "Fix: Contentful webhook body parse." (#40925)
Reverts vercel/next.js#40732

x-ref:
https://github.com/vercel/next.js/pull/40732#issuecomment-1258779835
2022-09-26 17:01:54 -07:00
JJ Kasper
3544c79582
Bump TypeScript version in with-typescript (#40924)
Bumps the version for the legacy `with-typescript` example as it's
behind our recommended TypeScript version. We can investigate aliasing
this example to the default template in a follow-up.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

x-ref:
https://github.com/vercel/next.js/pull/40863#issuecomment-1258771279
2022-09-26 16:59:46 -07:00
Jacob North
bb1dd47019
Correct link for "Deploy" button (#40894)
The old link was cloning the "with-chakra-ui-typescript" repo which has
been deprecated.

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [x] Fixed issue with link in README.md
2022-09-26 12:51:31 -07:00
Henrik Wenz
cc7fd2c247
chore: refactor with-web-worker example (#40844)
## Changes

- Updated dependencies
- Migrated to typescript
- Removed `div` in favour of Fragment
- Replaces `var` with `let` since we don't need global hoisting here

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-23 14:08:30 -07:00
Miguel Afonso
6a11e22e2d
Update .env.local.example (#40839)
We use the variable "SANITY_REVALIDATE_SECRET" on the index page, but
the .env.local.example does not have this variable.

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-23 14:02:24 -07:00
David Hay
bebf3725a8
fix/window.gtag is not defined for Next.js-hydration event(#40410) (#40645)
Next.js-hydration now triggered after gtag is initialized. Fixed by adding _document.js and appropriate script elements.
---
## Documentation / Examples

- [X] Related issues linked using fixes #40410
- [X] Make sure the linting passes by running `pnpm lint`
- [X] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Next.js-hydration now triggered after gtag is initialized.
2022-09-23 01:13:16 +00:00
Steven
be904d79ac
Open deploy link in new window for examples (#40804)
Let's open the deploy link in a new window so the link isn't blocked
when running an an iframe, such as Stackblitz.

Previously, this would print the following error:

> Refused to display 'https://vercel.com/' in a frame because it set
'X-Frame-Options' to 'deny'
2022-09-22 09:33:36 -07:00
Anthony Shew
ef9ba4509a
Fix: Contentful webhook body parse. (#40732)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-22 01:13:54 +00:00
Henrik Wenz
69595adc32
chore: refactor using-router example (#40774)
## Changes

- Updated dependencies
- Migrated to Typescript
- Added additional router use cases

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-21 23:37:57 +00:00
Balázs Orbán
1d7ce56a70
chore(examples): lock msw version in with-msw example (#40777)
Closes #40775

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-22 00:06:29 +01:00
Henrik Wenz
fc179d14ae
chore: migrate missing document of with-geist-ui example to typescript (#40743)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-21 11:29:25 -07:00
Henrik Wenz
806db1a27b
chore: refactor with-typestyle example (#40740)
## Changes

see commits

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-21 11:21:24 -07:00
Rishabh Poddar
51b728fbf4
Updates with-supertokens example app (#40707)
- Updates supertokens-node and supertokens-auth-react dependencies.
- Uses separate Email verification recipe instead of using it inside the
ThirdPartyEmailPassword recipe (as per the update)
- Uses <SessionAuth> guard instead of <ThirdPartyEmailPassword> guard
(as per the lib update)
2022-09-21 11:13:07 -07:00
Henrik Wenz
c2f48ea86d
chore: refactor with-next-sitemap example (#40712)
## Changes

see commits

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-20 19:10:22 +00:00
chornos13
a03cdc6d35
docs(examples): fix error connection handling (#40633)
When there's an error while connect to mongodb (timeout for example), it will be cached and need to restart next.js, by handling the error correctly (clear cached promise) it will try to reconnect to mongodb if the function is called again

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-09-19 21:26:24 +00:00
Henrik Wenz
7f9fe8ca30
chore: Refactor active-class-name example (#40670)
## Changes

- Migrated missing file to typescript

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-19 11:23:42 -07:00
Henrik Wenz
24b20dd13a
chore: Migrate with-prefetching example to typescript (#40671)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-09-19 11:15:54 -07:00
JJ Kasper
ff1a182b51
Revert "Fixed typo" (#40623)
x-ref:
https://github.com/vercel/next.js/pull/40608#pullrequestreview-1111135945

Reverts vercel/next.js#40608
2022-09-16 12:53:12 -07:00
Saalim Zafar
545ea5ec25
Fixed typo (#40608) 2022-09-16 13:04:20 +00:00
Miguel Oller
9780d813b9
Update cms-makeswift example (#40560)
This upgrades @makeswift/runtime to the latest version, which adds
support for the Slot control.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-14 15:16:48 -07:00
Henrik Wenz
155a4d5efc
[Docs] Remove legacy mobx example (#40304)
## Info

This PR merges with-mobx-lite into with-mobx. After that we will migrate `with-mobx` to typescript.

## Context

As discussed in https://github.com/vercel/next.js/pull/40302#issuecomment-1239238966 we are going to merge the mobx examples.

#40302

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-14 00:42:26 +00:00
Steven Tey
260ea550e0
Added comments to middleware-matcher example (#40273)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-13 12:21:05 +00:00
hiro
814144af7f
update(examples): Emotion modules (#40242)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-13 11:53:55 +00:00
Thomas Knickman
d83ceeec08
chore(examples): update turborepo examples link (#40487)
## Documentation / Examples

We now maintain a landing page of all monorepo examples with Next.js apps. We can point users here instead. 

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-12 18:46:16 +00:00
Balázs Orbán
13e423ccf6
chore: fix examples (#40395)
Closes #40366

Rebass is not dependent on `styled-components` anymore. See:
https://rebassjs.org/migrating/#v4-breaking-changes

Closes #40367

Document has been converted (#39871) from class, so `this.props` threw
an error.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-09 15:35:37 +02:00
Steven
66834d5c15
Fix image-component example types (#40352) 2022-09-08 11:09:46 -04:00
Henrik Wenz
2b9268a911
[Docs] Merge with-mobx-state-tree with with-mobx-state-tree-typescript example (#40306)
## Changes

see commits

## Context

As discussed in https://github.com/vercel/next.js/pull/40302#issuecomment-1239238966 we are going to merge the mobx examples.

#40302

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-08 12:56:12 +00:00
Henrik Wenz
b85fceac63
[Docs] Remove babel from custom-server-typescript example (#40309)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-08 12:50:53 +00:00
S0UPernova
1aa341f635
added type to clientPromise in with-mongodb/lib (#40339)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-08 12:44:38 +00:00
Henrik Wenz
588a61b432
[Docs] Migrate using-preact example to typescript (#40295)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-07 16:59:49 -07:00
William Duplenne
34fa5f8535
[Docs] Update react-remove-properties example (#40307)
Hi 👋 

Based on https://nextjs.org/docs/advanced-features/compiler#remove-react-properties, this is not experimental but lives under `compiler` now.

## Documentation / Examples
- [x] Make sure the linting passes by running pnpm lint
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-07 23:53:42 +00:00
Henrik Wenz
aa5be3ff64
[Docs] Migrate with-react-jss to typescript (#40308)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-07 16:39:35 -07:00
Henrik Wenz
16655c7924
[Docs] Migrate with-context-api example to typescript (#40297)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-07 09:14:54 +00:00
Henrik Wenz
abbe3b0ad4
[Docs] Update next-forms example (#40284)
## Changelog

see commits

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-07 00:33:51 +00:00
Katie Byers
77e7529dfe
ref(with-sentry example): Explicitly set hideSourceMaps (#40079)
This adds a default value for `hideSourceMaps` to the `next.config.js` the `with-sentry` example app provides, so that new users will use `hidden-source-map` as their Webpack `devtool` by default in client-side builds. (This prevents browser devtools from seeing sourcemaps and therefore prevents original source code from showing up automatically in the `Sources` tab. (More information on `devtool` values can be found [here](https://webpack.js.org/configuration/devtool/).)

In conjunction with https://github.com/getsentry/sentry-javascript/pull/5649, https://github.com/getsentry/sentry-wizard/pull/188, and https://github.com/getsentry/sentry-docs/pull/5464, this is the first step in addressing the concerns raised in https://github.com/getsentry/sentry-javascript/issues/4489. See [here](https://github.com/getsentry/sentry-javascript/issues/4489#issuecomment-1231137629) for more details.
2022-09-05 19:40:03 +00:00
Henrik Wenz
d0fc673f52
[Docs] Migrate image-component example to typescript (#40204)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

@styfle as suggested here the TS PR.

> I suggest creating the first PR that is just JS => TS.
> 
> The create a second PR that makes style changes.
> 

## Changelog

- Update react
- Migrated to typescript

## Related

https://github.com/vercel/next.js/pull/40153

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-05 09:28:23 -07:00
Jeferson S. Brito
591321e882
fix(examples/with-styled-components-babel): list should have unique key (#40215)
Fixes #40201 

## Bug

- [ ] Related issues linked using `fixes #40201`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-09-05 14:35:13 +00:00
Damien Simonin Feugas
866de41681
docs: documents middleware matcher (#40180)
### 📖 What's in there?

Middleware matchers are powerful, but very few people realized it, because they are not really documented.
This PR tries to bring more clarity, and includes a more advanced example.

The example shows how to exclude several pages (no `/static`, no `/public`), but also allow specific page in excluded paths (`/public/disclaimer`)

### 🧪 How to test?

Run the example: `pnpm next dev examples/middleware-matcher`, then browse to http://localhost:3000
The first 3 links should not match, the last 3 ones should.

Don't forget to clear your localhost cookies if you change the middleware code.

### 🆙 Note to reviewers

Using session cookies to pass information from middleware to the rendered page is not great, because `document.cookie` is not available during SSR, and because cookies persist when refreshing the page (making it hard to try different matchers)

However, I couldn't find a simpler way to convey the information from the middleware to the page, and I meant to have something visual. The other option is to use response headers and curl commands, but...
2022-09-05 13:36:09 +00:00
Avi Goldman
dcd4197c4c
Remove extra "d" in comment (#40212)
Super simple typo fix :)
2022-09-05 02:33:58 +00:00
Thomas Ballinger
b47f0a52e8
Update Convex example to convex 0.1.9 (#40162)
## Documentation / Examples

Update Convex to 0.1.9, now including specific deploy instructions for Vercel.

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-01 19:51:09 +00:00
Islam Shehata
9d30ef15e1
adding with-axiom example (#38300)
## Documentation / Examples

- [ X ] Make sure the linting passes by running `pnpm lint`
- [ X ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


This PR adds an example for using next.js with axiom.

Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: Steven Tey <stevensteel97@gmail.com>
2022-09-01 09:50:03 -05:00
Steven
4cc7f11da2
Update to stable: next/future/image, remotePatterns, unoptimized (#40142)
This PR updates a few features from experimental to stable status:

- `next/future/image` component
- `remotePatterns` configuration
- `unoptimized` configuration
2022-08-31 22:44:17 +00:00
Henrik Wenz
92aafcbcf1
[Docs] Add config types to all examples (#40083)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Summary

- Added jsdoc typing for all examples using `next.config.js`
- Added jsdoc typing for all examples using `tailwind.config.js`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-31 16:41:22 -05:00
Titus Moore
b83c5eb85c
Refactored the with-supertokens example to use typescript (#39987)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we
request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Convert example to use typescript.

Co-authored-by: Titus Moore <tmoore@edgewebware.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-29 12:40:26 -05:00
Jiachi Liu
8668020a54
Upgrade typescript to 4.8.2 (#39979)
Typescript published 4.8.2 today and it fails CI, bump our typescript version to 4.8.2 and tweak some typings to make existing e2e typescript tests work properly

* Bump web-vitals from 3.0.0-beta to 3.0.0 stable for typing fix (there's an undefined type but it wasn't caught by ts 4.7), also force compiled it as CJS for pre-compiled
* Bump ncc to 3.34.0 for ts-loader compatibility for new typescript version, ncc 3.33.x cannot work with ts 4.8
* Update pre-compiled
2022-08-29 16:56:02 +00:00
Thomas Ballinger
5891dae6f7
Remove semi in Convex example (#40052)
Remove semicolon from Convex example.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-29 10:42:00 -05:00
YK
47dc97cc61
Add local setup info in the with-supabase-auth-realtime-db example's README (#40030)
Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-08-28 17:25:00 +00:00
Hannes Bornö
27a519ba53
Use Font Optimization in examples (#39977)
Some examples don't the use the builtin [font-optimization](https://nextjs.org/docs/basic-features/font-optimization) and instead use an `@import` in its CSS.
2022-08-26 18:27:59 +00:00
Henrik Wenz
b02b2f708c
[Docs] Migrate with-xstate to typescript (#39974)
## Changes

- Update packages
- Migrate to Typescript
- Refactor Component structure
- Normalize Code style

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-26 12:51:01 +00:00
Henrik Wenz
53ecdd12db
[Docs] Prefer function _app component in examples (#39967)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-26 08:17:54 +00:00
Jonas Strassel
638e6d16f8
chore(with-docker): don't copy package.json twice (#39896)
the directory `/app/.next/standalone` already contains a copy of the package.json so we can skip copying it before we copy the standalone dir

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-24 09:35:44 -05:00
Henrik Wenz
64a3697d05
[Docs] Update examples to favour functional _document (#39871)
## Changes

- Migrate class based `_document`s to functional documents 
- Removed `_document.js` where default
- Removed `MyDocument.getInitialProps` where default

## Motivation

This removes some boilerplate and prepares examples for server components.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-23 18:52:31 +00:00
Henrik Wenz
16838d5dd4
[Docs] Migrate data-fetch example to typescript (#39852)
## Changelog

- Updated deps
- Migrated to Typescript
- Replaced `div` with `Fragment`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-23 14:23:38 +00:00
Miguel Oller
1f5da04dad
Update cms-makeswift example (#39834)
Upgrade @makeswift/runtime to the latest version. This removes the need
for the MAKESWIFT_API_HOST environment variable and improves error
messages when integrating Next.js with Makeswift.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-22 16:02:19 -05:00
Michael Oliver
c172d461c8
Remove unnecessary type reference in Vitest example (#39819)
Documentation / Examples

 Make sure the linting passes by running pnpm lint
 The examples guidelines are followed from our contributing doc


The Vitest docs state that /// <reference types="vitest" /> is only required when importing defineConfig from vite.
2022-08-22 09:18:40 -05:00
Henrik Wenz
827e120740
[docs] Migrate dynamic routing example to typescript (#39806)
Changelog

Migrated example to typescript
Remove obsolete Link->as prop
Normalize Module exports

Documentation / Examples

 Make sure the linting passes by running pnpm lint
 The examples guidelines are followed from our contributing doc

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-22 08:37:36 -05:00
Kasper Aamodt
bc4d98af72
Convert with-goober example to TS (#39761)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc]


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-08-21 22:56:51 +00:00
Henrik Wenz
74fb7ba03e
[Docs] Update mongodb example (#39658)
## Changelog

- Updated deps
- Migrated to typescript

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-21 22:38:48 +00:00
Kelvin Mok
72fd04a636
[Docs] examples/with-redux-thunk , update README (#39555) (#39712)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

This change is related to issue https://github.com/vercel/next.js/issues/39555  

PTAL, Thanks




Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-08-20 13:01:53 +00:00
Alex Cole
aacc0ce90f
Tweak Convex example (#39739)
This is a followup to #39562 because I realized I made a few mistakes.

Remove convex.json file. Developers using the example should generate this on their own by running npx convex init.
Switch prettier to a dev dependency.
Ignore formatting in Convex generated code while running lint-staged and revert them back to the default generated form (I previously was only ignoring generated code in the main .prettierignore)
Change a let to a const

cc @thomasballinger
Documentation / Examples

 Make sure the linting passes by running pnpm lint
 The examples guidelines are followed from our contributing doc
2022-08-19 18:13:33 +01:00
Tim Neutkens
6876bb4c44
Enable additional TypeScript ESLint rules (#39640)
Enables some rules that are useful and already pass currently.


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-16 11:08:40 +00:00
Henrik Wenz
3d3938b793
[Docs] Update with-slate example (#39639)
## Changelog

- Migrated `with-slate` example to typescript
- Updated dependencies to latest stable versions
- Added api route to demonstrate saving of `editorState`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-16 10:47:07 +00:00
Henrik Wenz
7a93093332
[Docs] Update with-loading example (#39646)
Changelog

Updated dependencies
Migrated to Typescript
Use CSS from npm module

Documentation / Examples

 Make sure the linting passes by running pnpm lint
 The examples guidelines are followed from our contributing doc
2022-08-16 11:29:48 +01:00
Alex Cole
11bd44f031
Update Convex Example (#39562)
This makes a few changes to the Convex example app.
We're using this example app in the Convex quick start (https://docs.convex.dev/quick-start), so I want to make sure we're setting new users up for success.

Upgrade to the newest version of Convex (includes adding a tsconfig.json for Convex functions)
Switch to pinning Convex to latest
Check in generated code so the example will make more sense to users browsing on GitHub or before they regenerate the code. This required ignoring it in the global .prettierignore
Add prettier
Update styling so "Powered by Convex" appears on screen.
Switch the syntax of one function to make it type check after developers add a schema

Documentation / Examples

 Make sure the linting passes by running pnpm lint
 The examples guidelines are followed from our contributing doc

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-16 01:21:53 +01:00
Milind Mishra ⚛️
6791e7547e
Typo (#39596)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

## Bug was a simple `typo`

![image](https://user-images.githubusercontent.com/28717686/184554656-83594c8e-cfab-4da1-89a2-f98d08ffe03f.png)


- Now fixed
2022-08-14 21:05:30 +00:00
Cody Olsen
0c7217ba8f
docs(examples): use vercel integration in cms-sanity (#39323)
## Feature

- [x] Documentation added

## Documentation / Examples

- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

This PR updates the cms-sanity example to:
- Deploy to Vercel with the [Sanity Vercel Integration](https://www.sanity.io/docs/vercel-integration) by default.
- You can still opt-out of using the Sanity Vercel Integration, clicking `You can also set up manually` gives you all the information you need.
- The blog itself is updated so it's much more resilient to missing data, and is setup to set `revalidate: 60` until you have a On-demand Revalidation webhook setup.
- Preview Mode is now enabled on the frontpage as well.
- The Sanity client setup, and webhook validation, are updated to follow our current best practices.
2022-08-12 03:56:49 +00:00
Jeferson S. Brito
249f429f52
fix(examples/with-wdyr): example config to support SWC (#39465) 2022-08-11 16:44:13 -05:00
Alvin Bryan
1f6bc34751
Fixed issues with environment variables for Windows users (#37853) 2022-08-11 11:39:53 -05:00
dcdev67
79d1b33332
[examples] Add on-demand revalidation to Contentful example (#39475)
## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Changes

Added in on-demand revalidation for Contentful example. Specifically, added the revalidate api path, a new environment variable which will contain the secret, and some additions to the README.


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-08-11 03:58:53 +00:00
Tim Neutkens
ed81a14922
Enable @typescript-eslint/no-use-before-define for examples dir (#39469)
Found that this rule was added but all options are set to `false` so it doesn't do anything. Started with enabling it for examples to ensure minimal breaking of existing PRs.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-10 16:30:36 +00:00
Anthony Shew
60c8e5c29e
Fix: broken TypeScript in WordPress example. (#39402)
* chore: add typescript and update deps

* style: add tsconfig

* chore: add g.avatar.com domain

* fix: images domain api url to match with hostname

* style: convert files to typescript

* refactor(Avatar): const name for readable purpose

* refactor: change regex to extract www from url

* Update next-image domains.

* Update a few types.

* Update readme.

* typo

Co-authored-by: Chaiwat Trisuwan <chaiwattsw@gmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Anthony Shew <anthony@inthezone.dev>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-08 14:18:26 -05:00
JJ Kasper
f60f8aede6
Land(Update example with-apivideo-upload README) (#39391)
* update(README)

* fix create scripts

Co-authored-by: MarDi66 <yohann.mtfpro@gmail.com>
2022-08-08 00:33:17 -05:00
LongYinan
4264408b16
Fix emotion shouldForwardProp options breaks component selectors (#39390)
fixes https://github.com/vercel/next.js/issues/38291



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-08 03:46:11 +00:00
Insik-Han
5910458245
update examples/custom-server-fastify and replace depreaction (#38269)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-08-07 16:52:02 +00:00
Shawn Callegari
0d5a692d0e
Port 'with-static-export' example to TypeScript (#38268)
The 'with-static-export' example is very useful but, if a developer wants to use TypeScript, converting it is nontrivial. There are some gotchas in the GetStaticProps/GetStaticPaths functions. This example should help jumpstart TS development for sites static generation.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-08-07 16:44:18 +00:00
Amir H. Khanjani
b1de1d1078
fix (examples): Changed the version of next-pwa (#39369)
next-pwa verison 5.5.5 causes the app to [crash](https://github.com/shadowwalker/next-pwa/issues/370). See issue #39224
Changed the version to 5.5.4 and removed `^`.

Fixes: https://github.com/vercel/next.js/issues/39383
2022-08-07 15:25:47 +00:00
Kévin Dunglas
43a4a8e6a6
chore: upgrade example to Docker Compose v2 (#39372)
Upgrade the README to use Docker Compose v2, which is faster and shipped by default with Docker Desktop since April.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-06 20:17:44 +00:00
Chaiwat Trisuwan
5f483b9743
Examples/cms-wordpress migrate to TypeScript (#39250)
## Documentation / Examples

Not sure that I need to provide type to all of components or not?
Let me know if you want me to provide.
- [x] Closes #38752
- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-05 16:44:19 +00:00
Phillip
b4027875e7
Fixed links to supabase examples (#39343)
Corrected links to supabase examples in the `with-supabase-auth-realtime-db/README.md`

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-05 02:00:48 +00:00
Cupid Valentine
0febcc3799
Add TypeScript to ant design example (#38470)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-08-04 14:21:51 +00:00
Duc Tran
b7997105a0
fix: use if...else in dockerfile (#39263)
* fix: use if-else in dockerfile

* fix: remove typo
2022-08-02 17:01:24 -05:00
Colin McDonnell
c4e8d7d7a3
Update edgedb.toml (#39243)
Update `with-edgedb` to use `2.0`.
2022-08-02 02:31:04 +00:00
John Daly
0c734543a6
examples/with-msw-typescript (#39196)
## Documentation / Examples

Updating the `with-msw` example to use TypeScript

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-31 15:54:30 +00:00
Baris Sayil
801acad17a
Fix typo in with-docker-compose README (#39176)
- [x] Simply fix a typo.
2022-07-29 20:00:18 +00:00
Lafif Astahdziq
377fddfaa9
fix: missing semicolon on Dockerfile (#39142)
The commit 0a781dd675 changes the docker examples to use `if..elif..else`

it is working fine tor the `with-docker` example, but not working for the `with-docker-compose` and `with-docker-multi-env` examples due to a missing semicolon.

Fix #39085



## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-28 15:23:11 +00:00
nasso
c4d41255fe
Convert the Cypress config to ESM Module syntax (#39036)
This seems to be what is recommended by the Cypress documentation:
https://docs.cypress.io/guides/references/configuration



## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-28 05:39:47 +00:00
Max Proske
e955850dd4
Convert cms-agilitycms example to TypeScript (#38976)
Converted `cms-agilitycms` example to TypeScript to match Contribution docs.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-27 19:24:54 +00:00
Thuy Doan
44b5534b85
feat(with-mux-video): Update mux-player scope and version to latest. (#39079)
# Description
Updates `with-mux-video` example to use latest scope and version of `@mux/mux-player-react` 🌈
2022-07-27 16:52:29 +00:00
Balázs Orbán
0a781dd675
fix: use if..elif..else in docker examples (#39072)
* fix: use `if..elif..else` in docker examples

* fix missing devDependencies for build

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-27 09:54:04 -05:00
Fikri Karim
fe72c828b6
docs(example): Update Makeswift example (#39070) 2022-07-27 09:00:28 -05:00
Marcos Bérgamo
c3e5caf110
docs(examples): improve DX while copying command to create new project (#38410)
* docs(examples): improve DX while copy command to create new project

* chore: apply code review

Co-authored-by: Marcos Bérgamo <Marcos.Bergamo@refinitiv.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-26 21:57:48 -05:00
JJ Kasper
0ab6ad5241
Update default gitignore templates (#39051) 2022-07-26 20:08:40 -05:00
Titus Moore
5bd155e220
Added workaround for --isolatedModules inside of configuration files (#39004)
This relates to a bug from issue #38957 found inside of the `with-cypress` example as a result of the recent typescript conversion. This issue can be resolved with adding `export {};` which prevents TypeScript from reading `.ts` configuration files from being read as legacy script files. This issue has been resolved on StackOverflow [here](https://stackoverflow.com/questions/56577201/why-is-isolatedmodules-error-fixed-by-any-import). More info on `--isolatedModules` can be read [here](https://www.typescriptlang.org/tsconfig#isolatedModules).

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`


Fixes #38597
2022-07-26 12:43:45 +00:00
Max Proske
e32a4c857b
Convert custom-routes-proxying example to TypeScript (#38974)
Converted `custom-routes-proxying` example to TypeScript to match Contribution docs.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-25 11:02:00 +00:00
Thomas Ballinger
e8a049272d
Update Convex example not to ignore generated files (#38931)
Ignoring files in `convex/_generated/` was a mistake: it's not the currently recommended workflow. Developers should be able to deploy just their frontend without deploying the most recent backend functions at the same time (which would regenerate these files). With this change, a default deploy to Vercel will no longer fail.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-22 18:51:10 +00:00
Han Yeong-woo
4d8d99e47e
chore(example): convert with-stitches to TS (#38892)
* chore(example): convert `with-stitches` to TS

* refactor: change arrow to declaration

* refactor: change import default to `* as`

* feat: add next.config.js

* refactor: improve typing

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-22 11:02:53 -05:00
Andrei Zanouski
e8bbf14865
Add example with cookies-next package (#31243)
* Add example with cookies-next package

* Update examples/with-cookies-next/package.json

Co-authored-by: Balázs Orbán <info@balazsorban.com>

* add typescript and update cookies-next version

* Update examples/with-cookies-next/.gitignore

Co-authored-by: Balázs Orbán <info@balazsorban.com>

* add @types/node in devDependencies

* update cookies-next

* Apply suggestions from code review

* change the function naming to be consistent with the idiom of working with a container of cookies and prettier-fix

* lint-fix

Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-22 10:32:54 -05:00
Raquel Amorim
552620f9b8
chore(examples): Convert with-cypress example to TypeScript (#38818)
- Update `with-cypress` example dependencies;
- Convert `with-cypress` example to TypeScript as suggested in the Contribution docs.


## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-21 16:40:51 +00:00
Balázs Orbán
adf40a6fce
chore: convert with-dynamic-import to TypeScript (#38844)
Closes #38806

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-07-21 02:22:58 +00:00
Thomas Ballinger
420d7850be
Update Convex example. (#38850) 2022-07-20 18:55:45 -05:00
Trevor Finn
47cb2364d2
Fix export issue in with-fauna example (#38812)
* Fix export issue in with-fauna example

* lint fix

* Apply suggestions from code review

* update

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-19 19:13:56 -05:00
Trevor Finn
5ea3077021
Fixup main Fauna example and drop support for outdated one (#38692)
- Drop support for Fauna example with cookie auth
- Fixup GraphQL endpoints in Fauna example

## Testing
Deployed the example to my own Vercel account to ensure I was able to standup the sample guestbook. Confirmed that entries reached my database for various region groups.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-19 20:16:48 +00:00
Balázs Orbán
bc9a4da4db
chore: update with-service-worker example (#38670)
Fixes #38613

Given `navigator.serviceWorker` [has ~96% support in browsers](https://caniuse.com/?search=navigator.serviceWorker), also removed the check for `"serviceWorker" in navigator`. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-18 20:01:49 +00:00
Balázs Orbán
35a3243854
chore: auto-detect preferred package manager in Dockerfile (#38693) 2022-07-18 13:45:39 -05:00
John Daly
f544a90ca4
Update with-emotion-swc to use TypeScript (#38744)
* Updating the with-emotion-swc example to use TypeScript

* Updating dependencies

* Adding @types packages for react and react-dom

* Adding @types/node
2022-07-18 13:25:33 -05:00
Balázs Orbán
4e3716d100
chore(examples): require WORDPRESS_API_URL to include /graphql (#38764)
Fixes #38749

Since we are calling it `API_URL`, it sounds more correct to require including the `/graphql` rather than making `WORDPRESS_API_URL` be just the root domain in 54f87245dc/examples/cms-wordpress/README.md (L96)


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-18 18:11:33 +00:00
Lee Robinson
54f87245dc
Update MongoDB example to use integration for deploy button. (#38738)
Rather than manually adding the environment variable.
2022-07-18 13:42:06 +00:00
Katie Byers
4a774a4864
feat(examples): Use helper function in with-sentry example _error.js (#37866)
This updates the `with-sentry` example to use the new helper function `captureUnderscoreErrorException` in its `_error.js` page. This new function both adds more data to sentry events and allows the code to be cleaned up quite a bit.

Fixes https://github.com/vercel/next.js/issues/37870.

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-07-15 21:02:13 +00:00
eminvergil
0e6c63f26a
add user check in auth-with-stytch. (#38648)
* add user check in `auth-with-stytch`.

* Revert "delete auto.js in pollyfills"

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-15 12:02:18 -05:00
Trevor Finn
b9ad4aa579
Update Fauna examples to support new FAUNA_DB_DOMAIN environment variable (#38434)
* Update Fauna examples to support new FAUNA_DB_DOMAIN environment variable.

* Address PR feedback. Reduce interface refactoring

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-13 10:26:12 -05:00
Alex Johansson
d2eb7861c3
Fix url of tRPC's next-minimal-starter (#38452)
Fix url of tRPC's `next-minimal-starter`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-11 12:30:16 +00:00
Max Proske
1d8df75bfd
chore(examples): Convert api-routes example to TypeScript (#38083)
Converted API Routes example over to TypeScript to match the Contribution guidelines.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-11 10:40:52 +00:00
Mihai C
d7568d8058
chore: update file references in Auth0 example README (#38476)
chore: update file references from README
2022-07-09 10:06:54 -05:00
Max Proske
bb0013f5fa
chore(examples): Convert api-routes-graphql example to TypeScript (#38357)
Convert `api-routes-graphql` example to TypeScript to match Contribution docs.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-08 11:44:39 +00:00
Max Proske
b8efd80c16
Convert api-routes-rest example to TypeScript (#38394)
Converted `api-routes-rest` example to TypeScript to match Contribution docs.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-07-08 11:06:40 +00:00
JulioCabanillas
65ea43f6d5
docs: add trpc to examples (#38272)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Nice to have nextjs up to date always!

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-07-08 11:00:01 +00:00
Marcos Bérgamo
34e296be2d
fix(examples/with-playwritght): use PORT env variable and fall back to 3000 (#38107)
## Documentation / Examples

- [x] Related issues linked using `fixes #37952`
- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-08 10:53:59 +00:00
Mathis Møller
4f09f95d6c
examples(with-jotai): Update example (#38398)
Updates `jotai` example.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-08 10:47:58 +00:00
Max Proske
6d8b2cd350
Convert api-routes-rate-limit example to TypeScript (#38393)
Converted `api-routes-rate-limit` example to TypeScript to match Contribution docs.

- Removed dead/non-standard/typo links for "Deploy You Own ▲" and "View Source"

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-08 04:17:08 +00:00
Max Proske
8783793273
Replace JS blog-starter example with TS, deprecate blog-starter-typescript example (#38395)
* Replace `blog-starter` JS example with `blog-starter-typescript`

* lint-fix, Revert pnpm-lock.yaml

* Revert root readme.md

* Add useful sections omitted from original Typescript convert

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-07 23:10:26 -05:00
Max Proske
0f4333a5a3
chore(examples): Convert blog example to TypeScript (#38095)
Converted Blog example over to TypeScript to match the Contribution guidelines.

I also simplified the example by removing `_document.js` and prettier from `package.json`.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-06 19:33:16 +00:00
Dustin Goodman
7f6b8ac7ee
fix: update with-msw example to function properly for all use cases (#38050) 2022-07-06 14:07:08 -05:00
Rishabh Poddar
b83107c38c
Updates with-supertokens example (#38369)
* add-supertokens-to-authentication.md

* bump supertokens deps

* update SuperTokens Auth doc

* Update docs/authentication.md

Co-authored-by: Lee Robinson <me@leerob.io>

* Update docs/authentication.md

Co-authored-by: Lee Robinson <me@leerob.io>

* updates supertokens dependency and optimises for serverless execution

* runs prettier-fix

* adds supertokens to 'Bring Your Own Database' section as well

* does not show home page if not logged in

* extracts config into its own file and calls it in all serverless functions

* removes need for backend init in app.jsx

* simplifies use of dynamic

* refreshes page after getServerSideProps

* removes unnecessary check in API

* update to docs pertaining SuperTokens

* adds placeholder secrets so that the UI loads on first run

* changes to readme

* updates version of supertokens frontend and backend SDK, and a few other fixes

* Update docs/authentication.md

Co-authored-by: Lee Robinson <me@leerob.io>

* updates to readme for supertokens example

* updates version of dependency

* updates dependency version

* updates to dependencies

* removes unnecessary config on frontend

* changes how redirection is done post signout

* update to dependency

* updates examples

* updates code to use for new package

* updates dependencies

* updates auth-react package

* with-supertokens example updated to use supertokens-node v7

* updates dependency

* updates supertokens-node version

* Update examples/with-supertokens/package.json

Co-authored-by: Lee Robinson <me@leerob.io>

* updates based on check-examples.sh script

* linter fix

* updates supertokens-auth-react dependency version

* adds development OAuth key to example

* removes section from README

* removes unnecessary file

* updates dependency versions

* with-supertokens: reduced bundle size by removing node lib from bundle

Linting fix

* Removed accidentally added config file

* adds sign in with apple

* extracted oauth keys to .env file

* fixes node init issue race condition

* removes unnecessary file

* updates supertokens-auth-react dependency

* updates superttokens-node dependency

* adds a cap to react dependency

* updates eslint-config-next version

* removes unnecessary dev dependency

* updates to latest version of supertokens-auth-react SDK

* Updated nextjs in supertokens example

* Update examples/with-supertokens/package.json

* Update examples/with-supertokens/package.json

* Update package.json

* Update examples/with-supertokens/package.json

Co-authored-by: Balázs Orbán <info@balazsorban.com>

* Update examples/with-supertokens/package.json

Co-authored-by: Balázs Orbán <info@balazsorban.com>

* updates to supertokens-auth-react version

* feat: update&improve ssr in with-supertokens

* refactor: implement review feedback

* refactor: moved everything into ProtectedPage to make Auth component usage clearer

* refactor: implement review feedback

* updates dependency version and uses nextjs router for navigation

* removes prettier dendency in with-supertokens example app
2022-07-06 13:47:21 -05:00
Yohann MARTZOLFF
27bfdec1ea
Add example: with-apivideo-upload (#36050)
* feat(app): Landing

* feat(index): Add button to video view

* Remove React stric mode

* feat(index): Handle navigate with query params

* feat(app): Create common style

* feat(app): Video view

* feat(video view): Add footer

* feat(app): Add .env

* feat(index): Hide upload button on progress

* Update pages type

* Change MyApp props type

* feat(index): Add prod domain for fetching

* update(app): CSS

* update(index): Domain name

* feat(index): Remove getSSProps

* Update README

* Update README

* update(status): CSS

* feat(index): Add link to GitHub repo

* Remove static API key from .env

* Lint

* update(packages): next version

* Lint + Prettier

* Remove name & version from package.json

* update: Rename .env.development -> .env.local.example

* update: Remove esLint + updagrade React & ReactDOM version

* Remove yarn.lock changes

Co-authored-by: José Barcelon-Godfrey <jose.barcelon@gmail.com>
2022-07-06 16:35:49 +02:00
Winme
58070c654a
Remove CharkraProvicer RestCSS prop (#38199)
See the charkra-ui offical docs [ChakraProvider component](https://chakra-ui.com/getting-started/cra-guide#chakraprovider-props), `resetCSS` default value now is `true`, So there is no need to add this prop again
2022-07-06 13:46:22 +00:00
Max Proske
88038ca21f
chore(examples): Convert api-routes-middleware example to TypeScript (#38358)
Convert `api-routes-middleware` example to TypeScript to match Contribution docs.

- Updated cookie util to match the [extending `res`  with TypeScript Next.js docs](https://nextjs.org/docs/api-routes/api-middlewares#connectexpress-middleware-support)

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
)
2022-07-06 13:33:55 +00:00
Max Proske
5145c2d5e2
chore(examples): Convert api-routes-cors example to TypeScript (#38356)
Convert `api-routes-cores` example to TypeScript to match Contribution docs.

- Update CORS configuration to match the [middleware Next.js docs](https://nextjs.org/docs/api-routes/api-middlewares#connectexpress-middleware-support)
- Allow POST requests as per instructions in `index.tsx`: "make a **POST** / GET / OPTIONS request to /api/cors"

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-06 13:12:40 +00:00
Jeff Mendez
616e0d7ee8
chore(examples): fix experiments loading npm wasm (#38348)
* enables default config that handles npm wasm bundles



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-06 13:05:14 +00:00
Cupid Valentine
9f162cc812
Update analysis scripts (#38201) 2022-07-05 15:04:54 -05:00
Riccardo Giorato
49129e7860
fix(examples): fix link on middleware example (#38323)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-07-05 13:16:34 +00:00
Eduardo Sigrist Ciciliato
7664a40064
feat(examples): adds middleware example (#38240)
## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-07-04 03:45:56 +00:00
Thomas Knickman
6aabef70b7
feat(examples): link to turbo next.js examples (#38173) 2022-06-30 11:43:20 -05:00
Max Proske
5044cd601a
Convert catch-all-routes example to TypeScript (#38188)
Converted Catch All Routes example over to TypeScript to match the Contribution guidelines.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-30 11:46:27 +00:00
Thomas Ballinger
8f707d4d74
Add Convex example (#38129)
Adds an example using [Convex](https://convex.dev/).

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-06-30 10:26:46 +00:00
Alan Pledger
90deca9509
Add a Makeswift example (#38018) 2022-06-29 13:25:51 -05:00
Max Proske
3d482cffbb
Convert basic-css example to TypeScript (#38091)
Converted basic CSS example over to TypeScript to match the Contribution guidelines.



## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-29 11:11:53 +00:00
Max Proske
5f5b266407
Convert basic-export example to TypeScript (#38092)
Converted basic Export example over to TypeScript to match the Contribution guidelines.


## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-29 11:05:51 +00:00
Max Proske
55560e0c58
Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.

Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-06-29 11:00:13 +00:00
Jo Franchetti
bbffaea755
Adding with-ably example for realtime messaging in next apps (#37319)
* update from latest canary

* lint-fix
2022-06-29 12:52:04 +02:00
Max Proske
1648064d0e
Convert analyze-bundles example to TypeScript (#38040)
Converted Next.js Bundle Analyzer example over to TypeScript to align with the Examples guide.

I also replaced `faker` with `@faker-js/faker`. Faker has been forked and maintained [here](https://github.com/faker-js/faker) after the original author [deleted](https://www.theverge.com/2022/1/9/22874949/developer-corrupts-open-source-libraries-projects-affected) the library.

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-27 00:32:37 +00:00
Max Proske
1d5dd1bad3
Convert amp-story example to TypeScript (#38038)
Converted AMP Story example over to TypeScript to align with the Examples guide.

Note: Requires `v12.1.7-canary.41` or newer to build https://github.com/vercel/next.js/pull/37744#issuecomment-1159573754

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-27 00:26:34 +00:00
Radu Nemerenco
83ac913950
fix(38043): replace double slashes with hashtag for comment lines in … (#38044)
…env example files



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-27 00:04:05 +00:00
Max Proske
d57342a94e
Convert amp-first example to TypeScript (#38029)
Converted AMP First Boilerplate example over to TypeScript to match the Contribution guidelines.

Note: Requires `v12.1.7-canary.41` or newer to build https://github.com/vercel/next.js/pull/37744#issuecomment-1159573754

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-26 11:43:36 +00:00
Aleksa Cukovic
bcd8de3262
Add *.tsbuildinfo to .gitignore of examples that use typescript (#38005)
I added ` *.tsbuildinfo` to gitignores of examples that use typescript and don't already have it. By use typescript I mean have `tsconfig` somewhere in their directory tree. 

I used the following script to update the files:

```bash
#!/bin/bash

set -eou pipefail

cd examples
examples=`git ls-files . | grep tsconfig | xargs dirname | grep -v "/"`

for example in $examples; do
    if ! grep -q tsbuildinfo $example/.gitignore; then
        gitignore="$example/.gitignore"
        echo $gitignore
        tail -c1 $gitignore | read -r _ || echo >> $gitignore
        echo -e "\n# typescript\n*.tsbuildinfo" >> $gitignore
    fi
done
```
2022-06-26 11:17:44 +00:00
william-keller
2997ff0711
Fixing bug - Can't resolve 'prop-types' (#38021)
## Bugfix

- Missing package dependency in package.json causing -> Can't resolve 'prop-types'
2022-06-26 03:12:55 +00:00
Lee Robinson
8ce2790026
On-demand ISR updates. (#37955)
* On-demand ISR updates.

* Apply suggestions from code review

* lint-fix

* Update docs/basic-features/data-fetching/incremental-static-regeneration.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-24 16:59:23 -05:00
JJ Kasper
20d6792542
Move outputStandalone config (#37994) 2022-06-24 14:58:35 -05:00
Raymond Cheng
ee89517848
Add a Plasmic example (#37522)
This adds a new example under `cms-plasmic/`. It serves as a general-purpose example that should be able to work with any Plasmic project, which can be set via environment variables.

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-22 15:19:04 +00:00
Matteo Bruni
cf3ba271e9
Added with-particles template (#35471)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-06-22 15:13:10 +00:00
Balázs Orbán
b8c61a9c27
chore: detect no canary verification (#37788)
When triaging bug reports, we would like to make sure that our main focus is on unresolved issues. Next.js is a highly active project, and we cut new releases fairly often, under the `next@canary` tag. Some of the issues being reported might have already been fixed there, so we would like to encourage people to check them out. Once a fix is in `canary`, it will be included in the next `latest` release automatically.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-22 14:54:11 +00:00
JJ Kasper
c4dc081e70
Fix styled-jsx types when package is not hoisted (#37902)
This ensures we expose the `styled-jsx` types correctly even when the package is not hoisted from next's `node_modules` e.g. when using `pnpm`. We had an existing test that covered this although it installed `styled-jsx` at the top-level as a workaround so the test has been updated to remove this workaround. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

Fixes: https://github.com/vercel/next.js/pull/37828#discussion_r901164193
2022-06-22 12:09:22 +00:00
Ilya Taratukhin
a4117c94b0
Adding example with-fingerprintjs-pro for identifying visitors (#37549)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Deployed on https://with-fingerprintjs-pro.vercel.app/
2022-06-22 11:48:22 +00:00
Henrique Holtz
4dfe5634fb
[Examples] Add external example with typescript to "with-material-ui" folder (#37846)
## Documentation / Examples

- Add external example with typescript to `with-material-ui` folder as suggested on PR below.

[older PR related](https://github.com/vercel/next.js/pull/37499)

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-06-22 09:47:56 +00:00
Balázs Orbán
c04a6b04f2
chore(examples): fix active-class-name example (#37828)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-21 15:44:29 +00:00
rodrigo
eb9a500d4c
[Examples] updated styled-components (#37856)
### Example

- added declaration file types for the used theme [Create a declarations file](https://styled-components.com/docs/api#create-a-declarations-file)
- added custom styled component that wraps an `<a>` tag like the next js docs as example [Next link DOCS](https://nextjs.org/docs/api-reference/next/link#if-the-child-is-a-custom-component-that-wraps-an-a-tag)
- changed the ui page like the `create-next-app` examples

### Dependencies

- updated deps to latest
- added types for SC  => @types/styled-components
- removed react-is, unused in this example

 [Example deploy](https://stylednextexample.vercel.app/)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-21 13:15:46 +00:00
Saurabh
e9659113f0
update devdDependencies @types/react and @types/react-dom (#37423)
fixes #37421
2022-06-20 14:12:56 +00:00
Tony Spiro
6a39d5181f
Update Cosmic CMS Example: cosmicjs package to v4.1.7, update queries (#37693)
Thank you 🙏🏻
2022-06-20 13:30:43 +00:00
Gal Schlezinger
9184d6d342
[edge api] allow wasm usage (#37836)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-06-20 15:08:40 +02:00
Dongho
d6fb8337ba
feat: add correct type to with-styled-coponents (#37816)
There's a missing type in with-styled-coponents example's _document.tsx file



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-19 16:58:08 +00:00
Max Proske
1ccf894501
Convert amp example to TypeScript (#37744)
Converted AMP example over to TypeScript to match the Contribution guidelines, updated all dependencies, and made some necessary changes to allow AMP apps to build in TypeScript.

I added an additional .d.ts file, and referenced it in the tsconfig.json include array, as per the [Next.js docs](https://nextjs.org/docs/basic-features/typescript#existing-projects). These additional types are required to allow lowercase AMP elements to be a property on JSX.IntrinsicElements.

Fixes: 
> Property 'amp-img' does not exist on type 'JSX.IntrinsicElements'.ts

I also replaced all occurrences of styled JSX with [@ijjk's workaround](https://github.com/vercel/next.js/issues/7584#issuecomment-503376412) to get styles in the head at build time for AMP-only pages, hybrid AMP pages, and normal pages (non-AMP). 

I tried using the useAmp hook first with multiple `<style jsx>` like this [Next.js discussion](https://github.com/vercel/next.js/discussions/16755), however AMP expects a [single `<style amp-custom>` tag in the head](https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#stylesheets).

Fixes: 
> The parent tag of tag 'style amp-custom' is 'body', but it can only be 'head'

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-18 17:18:21 +00:00
Qiushi Pan
455b74fe54
fix: markdown format for the blog-starter example (#37792)
## Documentation / Examples

The markdown format for blog-starter example was broken, so fixed it.


- [x] Make sure the linting passes by running `pnpm lint`
  It failed, without my changes.
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-17 17:06:22 +00:00
dfelsie
e4b1fb0793
Update Chakra-UI dependencies for React 18 (#37772)
Title self-explanatory: the package.json inside of the with-chakra-ui example template has been updated to newer versions


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-17 03:21:06 +00:00
Frankie
ea89854e32
Update Ghost CMS Example: Accept-Version Header API requirement, typo (#37737)
* Update next.config.js

Fix typo on next config

* Update api.js

Update Ghost's content-api version `Accept-Version: v{major}.{minor}` requirement

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-15 21:21:31 -05:00
Max Proske
007d186b78
Convert hello-world example to TypeScript (#37706)
TypeScript is being leveraged for new examples going forward, so I'm converting this example over. 😂

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-15 11:33:35 +00:00
Max Proske
78809a3d68
Add with-docker-compose example (#32668)
`with-docker-compose` contains everything needed to get Next.js up and running with Docker Compose.

This example aims to provide an easy-to-use, Next.js app development and production environment, **all without Node.js being installed** on the host machine. This ensures a consistent development environment across Windows, MacOS, and Linux teams.

I was inspired to create this, because the existing [with-docker](https://github.com/vercel/next.js/tree/canary/examples/with-docker) example only uses Docker to build the final production artifacts, not provide a development environment. Docker Compose easily syncs changes with containers for Hot Reloading, parallel builds, and networking, making it a powerful and consistent development tool.

Developers can **easily extend this example** by modifying the YAML files to include Nginx, Postgres, and other Docker images. 

This example takes advantage of Docker multistage builds combined with the Next 12.1 [Output Standalone](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files-experimental) feature, to create up to **80% smaller apps** (Approximately 110 MB compared to 1 GB with create-next-app). I also included an example without multistage builds, for developers who don't want to get into the weeds.

I have been tweaking this Docker Compose setup over 3 years of real world use, but please let me know if anything can be improved.
2022-06-14 11:13:55 +00:00
Max Proske
3a22c4c554
Convert active-class-name example to TypeScript (#37676)
The Contributing guidelines say TypeScript should be leveraged for new examples, so I thought I'd convert this example over. 

I also:
- Upgraded all dependencies
- Replaced the `prop-types` package with TypeScript types

## Documentation / Examples

- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-06-14 08:49:09 +00:00
Thuy Doan
748cc51c34
Update with-mux-video to use latest upchunk and replace video player with mux-player-react (#37621)
* Update upchunk to latest (2.3.1).

* Add mux-player package to package.json

* WIP: Make VideoPlayer return mux-player

* Remove unused code from prev video player

* Use mux-player-react directly

* Fix import line for mux-player-react

* chore: fix lint issues
2022-06-13 10:06:07 -05:00
Adam Sobotka
89b961e191
Request library required by setup (#37658)
In my last PR I removed the request library as it is obsolete and the application does not use it. The database setup utility does though, so I am reverting this change.  


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-13 11:00:50 +00:00
Adam Sobotka
31c8b97a45
Update with-faunadb dependencies (#37650)
This is just a bump of tech stack used in the example and small rewrite of swr functionality.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ x ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-13 02:57:56 +00:00
You Nguyen
2daa4117c6
Bump version tailwindcss example to 3.1 (#37633) 2022-06-11 23:53:30 +00:00
Alabhya Jindal
30150e449c
Changed _app.js to a functional component (#37635)
Changed the class component to a functional component of the _app.js file. This is for the Context API example.
2022-06-11 23:47:23 +00:00
Joseph
085ee96577
Fix with mux video example (#37434)
* fix: On error upchunk dispatches an object

* chore: Typo on contribution guide, `unverfied`

* Update contributing.md

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-10 19:50:28 -05:00
Bel
2acac8ad8f
Update for CMS Wordpress Example. (#37402)
This PR updates cms-wordpress example:
- updated dependencies
- image domain handling
- new image domains
- error handling for lack of env variables
- minor code updates (isr)

Demo here: https://example-cms-wordpress.vercel.app/ -> should replace https://next-blog-wordpress.vercel.app/ that's using a buggy wpengine instance.

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-03 06:34:29 +00:00
Dany Gagnon
5384171bb6
Remove extra prettier config from tailwindcss example (#37351)
Prettier should be a dev dependency.

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-01 00:50:47 +00:00
ArianHamdi
0d2121db1f
change map function to forEach function (#37284)
close #37283
2022-05-29 20:23:04 +00:00
Lee Robinson
c4fdfcb7f1
Update GitHub Pages deployment example. (#37282)
Verified it's working: https://leerob.github.io/gh-pages-test/
2022-05-29 20:12:37 +00:00
Cozy Indigo
c7ab218db2
Updated graphql API to support v1.7.2 (#35896)
## Documentation / Examples
- [X] Make sure the linting passes by running `yarn lint`
Graphql API has updated with use of nodes, this bugfix updates these specifications.


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-29 02:49:59 +00:00
Saullo Almeida
69cc9b3633
chore: update with-tailwindcss example to TypeScript (#37208)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-29 01:54:04 +00:00
Imad Atyat-Allah
3c295f0017
Fix with-contentlayer example build error (#37257)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-05-27 22:11:50 +00:00
Steven
57dcc9d329
Update pnpm create next-app for latest pnpm 6 and 7 (#37254)
This command changed in pnpm [6.32.13](https://github.com/pnpm/pnpm/releases/tag/v6.32.13) and [7.1.1](https://github.com/pnpm/pnpm/releases/tag/v7.1.1) so lets update it since its been a few weeks and we can expect pnpm users to update more regularly than npm users.

- Fixes https://github.com/vercel/next.js/pull/37240 
- Fixes https://github.com/vercel/next.js/pull/37045
- Fixes https://github.com/vercel/next.js/pull/37032
- Fixes https://github.com/vercel/next.js/pull/36602
- Fixes https://github.com/vercel/next.js/pull/36496
2022-05-27 21:21:40 +00:00
Tom
3e178bb801
add pnpm link to docs (#37221)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)


Co-authored-by: Steven <steven@ceriously.com>
2022-05-27 15:46:38 -04:00
Balázs Orbán
7ac7ae62b0
chore: simplify with-styled-components (#37237)
Fixes https://github.com/vercel/next.js/issues/37230

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-05-27 15:27:35 +00:00
Tom Marshall
6a5bdb5d80
Update cms-kontent example to action PR feedback (#37206)
* Updates the `cms-kontent` example `Image` component to implement the
  suggested improvements from @styfle in #37188.
* Simplifies the Kontent loader host checking.
* Reduces the default image quality to from `100` to `75`.
* Add `tslib` dependency to fix `Module not found: Can't resolve 'tslib'`
  error when importing `transformImageUrl` in the `Image` component.
  It looks like this might be a bug in v11 of the Kontent Delivery SDK,
  as it appears `tslib` needs to be included as dependency, rather than
  dev dependency. I missed this originally as the example runs fine in
  the Next repo as the root `yarn.lock` has `tslib`. It's only when the
  example is used via `yarn create next-app` that the issue occurs. We
  can likely remove this in future alongside an upgrade to the SDK
  package once this issue has been fixed and released there.

https://github.com/vercel/next.js/pull/37188
2022-05-26 10:29:16 -05:00
Tom Marshall
82a9d21809
Fix cms-kontent example Next/Image domain error (#37188)
* Fixes the following error in the `cms-kontent` example by implementing
  an `Image` component to wrap `Next/Image` with a custom loader.

```
Invalid src prop ... hostname "assets-eu-01.kc-usercontent.com" is not configured under images in your `next.config.js`
```

* This error is affecting both the `pages/index.js` and
  `pages/posts/[slug].js` routes.
* Uses a custom loader rather than adding the Kontent asset domains to
  `next.config.js` as we can transform the images using the Kontent
  Delivery API directly rather than delegating this to the Next app web
  server.

Ref:
* https://nextjs.org/docs/messages/next-image-unconfigured-host
* https://nextjs.org/docs/basic-features/image-optimization
* https://meeg.dev/blog/using-the-next-image-component-with-kentico-kontent-assets
* b7c9ef588c/components/Image.js
* https://kontent.ai/learn/reference/image-transformation/
2022-05-25 10:40:18 -05:00
Tom Marshall
d9b6d99625
Update cms-kontent example SDK package to v11 (#37187)
* Updates the Kontent Delivery SDK from v9 to v11.
* Updates the `lib/api.js` code that utilises the SDK accordingly.
* Removes `rxjs` as this is no longer a dependency of the Kontent
  Delivery SDK in v11.
* Updates other packages to the latest versions, including `react`.

Ref:
* https://kontent.ai/blog/news-in-javascript-sdks/

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-25 15:36:40 +00:00
Charly POLY
565a2fafac
refactor(examples/with-typescript-graphql): use codegen TypedDocumentNode and GraphQL Yoga for better DX and smaller bundle size (#36240)
Improve the Next.js with TypeScript + GraphQL example:

- [x] use GraphQL Code Generator instead of `graphql-let`: more widespread tool and smaller bundle size (types only generation vs code generation)
- [x] use GraphQL Yoga instead of Apollo Server Micro: for lighter bundle size as [stated here](https://github.com/vercel/next.js/pull/36155)
- [x] introduces GraphQL Code Generator on the API side for Resolvers typing

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-23 16:58:27 +00:00
Charly POLY
874957e767
feat(examples): refactor api-routes-graphql to GraphQL Yoga (#36155)
GraphQL Yoga provides a more extensible experience ([Envelop plugins](https://envelop.dev/)) and lighter bundle than the previously showcased `apollo-server-micro` ([64.5kB](https://bundlephobia.com/package/@graphql-yoga/node@2.2.1) vs [196.2kB](https://bundlephobia.com/package/apollo-server-micro@3.6.7) - min & GZiped)

Similar to Next.js, GraphQL Yoga comes with strong defaults and out-of-the-box support for modern GraphQL features (File uploads, subscriptions, and more).

Strong of many years of existence and a large community, GraphQL Yoga 2.0 comes with Next.js support with no additional package or configuration 📦 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-23 16:27:41 +00:00
Charly POLY
cf0158ce8d
feat(examples): build a GraphQL Gateway with GraphQL Mesh and Next.js API routes (#36439)
* feat(examples): GraphQL Mesh Gateway example

* doc(examples/with-graphql-gateway): README

* fix(examples/with-graphql-gateway): ignore `.mesh/`

* Apply suggestions from code review

* lint-fix

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-05-23 11:02:21 -05:00
Kamil Ogórek
241c510e5b
docs(with-sentry): Add note regarding replacing wizardcopy.js config files (#37039) 2022-05-22 21:55:12 -05:00
Herman
25a4c00559
[EXAMPLES] fix apollo client cache hydration (#27799)
Current implementation causes bugs when navigating between SSG,SSR and 
Client Side pages as cache gets overwritten.

Reusing more appropriate implementation used in example 
api-routes-apollo-server-and-client-auth introduced with commit 
4bbdd09097
2022-05-22 21:47:25 -05:00
Fabien Le Frapper
e04d293da3
Use apollo onError in with-apollo example (#25051)
Use Apollo onError in order to flag GraphQL errors in the next.js server logs in the with-apollo example
https://www.apollographql.com/docs/react/api/link/apollo-link-error/

## Documentation / Examples

- [x] Make sure the linting passes

~⚠️ I lazily created this PR from Github directly as I don't have a local build of next.js on my current machine. 
If ever linting does not pass, I will update this later today (sorry for the noise). 
EDIT: it does not, I will update this PR shortly.~
2022-05-22 23:55:56 +00:00
Woochul Lee
f467bf2e3a
Fix gh-pages example for windows user (#35169)
Windows users cannot use the `rm` and `touch` commands. So I replaced it with `rimraf` and `touch` package.

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 21:16:15 +00:00
Rubens Armôa Lopes
9ceccbcf82
docs: svg as component example leveraging swc instead of babeljs (#36410)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 21:01:16 +00:00
Imad Atyat-Allah
99b017e5cb
example: Added with-contentlayer example (#30045)
## Documentation / Examples

- [x] Make sure the linting passes


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-05-22 15:19:10 +00:00
Munawwar
bb7b75809d
update zustand example (#35022)
Made SSG and SSR code similar. Comments and variable renames on store.js

Checklist:

## Documentation / Examples

- [✓] Make sure the linting passes by running `yarn lint`
2022-05-22 04:57:40 +00:00
irvile
53eb046790
fix(with-tailwindcss-emotion): 'theme' of undefined (#35588)
Closes [#26337](https://github.com/vercel/next.js/issues/26337).
This PR fixes #26337.

The issue is just the version of xwind basically.
Not compatible with newer versions and jit mode.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-22 04:42:51 +00:00
Don Morrison
3c001aaae9
fix(examples/with-segment-analytics): Update README (#35387)
Update the README for `examples/with-segment-analytics`:

- Update reference from `_document.js` (removed in 92d87870af) to `_app.js`.
- Update reference links
- Make small language tweaks

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-22 04:33:01 +00:00
Igor Loskutov
87e93a275d
custom-server-express fix type definition and eliminate dead code (#37054)
Hi, this signature confused me a bit when I was porting it in typescript. Turns out there's dead code: there's no Error object passed to this function. Details of this signature are in this answer: https://stackoverflow.com/a/56291567/2123547, and in `@types/express-server-static-core` it is `listen(port: number, callback?: () => void): http.Server;`. Types definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-serve-static-core/index.d.ts#L1198

fixes #37053

## Bug

- [x ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ x] Make sure the linting passes by running `yarn lint`
2022-05-22 02:34:08 +00:00
LongYinan
33c837b115
Stabilize SWC emotion transform plugin (#37058) 2022-05-21 04:09:30 +00:00
Mike Fix
91c75b6c1f
Add with-markdoc/ example (#36867)
* add with-markdoc/ example

* rename as markdoc/

* use latest

* update README

* add .gitignore

* typescript changes

* update .gitignore

* make folders files

* update next.config.js

* fix prettier

* rename _app.ts -> _app.tsx
2022-05-18 18:52:45 -05:00
Rishabh Poddar
4ff459730a
Update to with-supertokens example (#36906)
Update version of supertokens-auth-react to add react 18 support.

Co-authored-by: Bhumil Sarvaiya <21988812+bhumilsarvaiya@users.noreply.github.com>
Co-authored-by: Joel Coutinho <6310783+jscyo@users.noreply.github.com>
2022-05-15 15:53:02 +00:00
JJ Kasper
167a91b73e
Remove un-helpful error in with-sentry example (#36902)
The error reported here is unclear and un-helpful so we shouldn't be recommending to report this by default. 

x-ref: [slack thread](https://vercel.slack.com/archives/CGU8HUTUH/p1652466540356879) 

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-13 23:15:09 +00:00
Balázs Orbán
2ed5b3d5f0
chore: update Jest example snapshots (#36884)
Follow-up: https://github.com/vercel/next.js/pull/36858#pullrequestreview-971074854

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-05-13 16:18:06 +00:00
Gregor Adams
6582ecc348
fix(examples): maxlength was inconsistent (#36840)
the value and help-text were irritating
the value of the help-text is now used as value



## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-13 14:32:08 +00:00
Luke Shumard
2b88467dd9
Example/facebook pixel script (#34417)
The [with-facebook-pixel](https://github.com/vercel/next.js/tree/canary/examples/with-facebook-pixel) example attempts to run the <Script /> loading the Facebook Pixel on every request. This results in a warning stating `[Meta Pixel] - Duplicate Pixel ID: xxx`. According to the Next.js docs, by using an [id on the inline script](https://nextjs.org/docs/basic-features/script#inline-scripts) Next is able to track and optimize the script. Since this is absent on the present example, the inline script is continuously loaded on every request.

I've added an id to this inline script, and the warning from facebook is no longer present.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-05-13 14:17:15 +00:00
Balázs Orbán
b596ce9d6a
chore: upgrade dependencies in Jest examples (#36858)
Ref: https://github.com/vercel/next.js/issues/36842, https://github.com/vercel/next.js/pull/36632, https://github.com/vercel/next.js/pull/36787

Upgrading to Jest 28, and aligning Babel example with `with-jest`


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-05-12 15:37:37 +00:00
JJ Kasper
e05a95a844
Update moduleNameMapper jest config and remove extra deps (#36787)
* Update moduleNameMapper jest config and remove extra deps

* move svg mock to its own entry for easier overriding

* remove package script
2022-05-10 16:36:10 -05:00
James Perkins
22c0b65eb5
Fixing Tina + Adding a demo URL (#35480)
## Documentation / Examples

- Updating Tina Demo URL
- Adding Tina to blog-starter example
- Adding Tina to Basic features section
- Updating Tina to actually work again
2022-05-10 17:52:54 +00:00
Marzouq
342331e66d
added example: with-geist-ui (#36525)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-05-10 11:02:02 +00:00
Luis Alvarez D
08ffbc9e09
Fix playwright tests (#36705) 2022-05-05 10:08:28 -05:00
Maria Violante
fec5318e91
Update buttercms example (#35436)
* remove old buttercms project files

* Updated .gitignore

* Add new buttercms files

* Add readme and remove name from package.json

* fix linting error

* Fix eslint

* Update examples/cms-buttercms/.gitignore

Co-authored-by: Lee Robinson <me@leerob.io>

* renamed .env.sample > .env.local.example

* remove dangerously allow svg

* Update examples/cms-buttercms/package.json

Co-authored-by: Lee Robinson <me@leerob.io>
2022-05-03 12:41:27 +02:00
HYEON GYU KIM
cb4eaaab6d
add Script key for cache (#36627)
Script component manages the cache as src or id. But in this example, id is missed.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-05-02 17:31:45 +00:00
ro11ingbutler
948128ae19
Fix typo (#36592)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-04-30 18:35:38 +00:00
Lazar Nikolov
cc35859fe7
docs(examples): Updated Chakra UI examples (#36333)
## Overview

This PR updates both Chakra UI examples by updating the Chakra UI packages to the latest versions, and added better examples for Semantic Tokens (new feature in Chakra UI), and pseudo props.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-04-28 12:36:33 +00:00
Colin McDonnell
842e4ec023
Add with-edgedb example (#35929)
## Documentation / Examples
 
- [X] Make sure the linting passes by running `yarn lint`
2022-04-27 16:49:17 +00:00
JJ Kasper
51bdd97033
Fix failing yarn PnP test from missing dependency (#36515) 2022-04-27 17:32:44 +02:00
Rafo
0cb2037a41
[examples] Update styled-components with Babel - add types (#36125)
This PR is looking forward to improve documentation exemples about usage of Next.js with Typescript and Styled-components. 

I added Typescript types to the original exemple [Example app with styled-components using babel
](https://github.com/vercel/next.js/tree/canary/examples/with-styled-components-babel)

## Feature

- [x] Related issues linked using 
- [x] Documentation added

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

fixes #36008
2022-04-27 12:43:06 +00:00
Mohamed Achaq
fca1071941
Adding Typescript and Mantine example (#36294)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-04-27 12:36:04 +00:00
Alex
adcd9143fe
Grammar Changed features and API to features and it's API (#36396)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-04-25 13:50:17 +00:00
Marzouq
1f0f2c0ab8
added with-react-foundation example (#36375)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-04-25 12:43:14 +00:00
Jordan Baron
b6f168bd0e
Add pnpm-debug (#36394) 2022-04-25 14:19:02 +02:00
Marzouq
a0b7006732
updated with-rebass dependencies (#36416)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-04-25 03:06:26 +00:00
Najmus Sakib
084a0ca929
Removed unnecessary React Fragment (#36331)
## Update
[-] Removed React fragment from index
2022-04-21 08:37:37 +00:00
Michael Novotny
52fefb13e2
Adds removeListener handler to with-electron-typescript example. (#36323)
Without removing the listener in `useEffect`, the home / index page will keep adding a new listener each time you come back to the home page.

![CleanShot 2022-04-20 at 15 38 44](https://user-images.githubusercontent.com/446260/164318945-f1779c57-ff30-437b-8914-961cd6ebc176.gif)
2022-04-20 20:54:33 +00:00
Matheus Martins
91fd5971d6
docs: add yoga to examples (#36253)
## Description

The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces.

- https://github.com/Gympass/yoga
- https://gympass.github.io/yoga/

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-04-19 22:27:14 +00:00
Bartłomiej Krakowski
90d30cd2c9
docs(examples/with-emotion-swc): update readme (#36197)
This PR fixes the wrong path to creating an app using the `with-emotion-swc` example.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-04-15 18:50:29 +00:00
Michael Novotny
be3c804b8d
Fixes scripts in Electron examples. (#36133)
There were a few issues with the scripts in the Electron examples:

* `dist` and `pack-app` would fail without a `name` and `version` in `package.json`.
* `type-check` didn't work because there isn't a `tsconfig.json` at the root. It needs to look in the `electron-src` and `renderer` folders respectively.

`electron-builder` also needed to be updated in order to run on macOS 12.3+ (see https://github.com/electron-userland/electron-builder/issues/6606). 

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-04-14 00:04:41 +00:00
William Li
ad1b6310de
add support for changing /route/#hashes (#36079)
update with-google-analytics example to also fire events when the hash section of the URL changes.
2022-04-12 16:32:32 +00:00