Commit graph

11 commits

Author SHA1 Message Date
Valentin Politov
9168dffc02
examples: Bump SWR to v2.0.0 (#44790) 2023-01-12 09:36:29 -08: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
Ty Mick
4452366e19
Fix dependency in api-routes example (#29181)
* Upgrade SWR dependency

* Fix capitalization of "Beru Whitesun Lars"
2021-09-17 11:04:05 -05:00
Oscar Busk
077097b7f8
Remove licence from all example/package.json that has them (#28007)
* Add licences to all example/package.json that lack them

* Revert "Add licences to all example/package.json that lack them"

This reverts commit 5d4e25012f7334772b8ef5924bc355277e827cba.

* Update check-examples to remove `license` field from examples

* Remove `license` from all examples.

This was mentioned in vercel/next.js#27121 but it looks like it didn't end up being in the merge?

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-14 10:48:39 -05:00
Luc Leray
f52955ec94
Clean up examples package.json (#27121)
Clean up package.json files in the `examples` directory:
- Add `private: true`
- Remove `version` (because they are irrelevant for packages that are not meant to be published)
- Remove `name` (because they are optional for packages that are not meant to be published, and when someone clones an example, they often rename it and the property becomes stale)
- Remove `author`
- Remove `description`
- Remove `license`

Also remove `with-dynamic-app-layout` example completely, since it does the same as `layout-component` (https://github.com/vercel/next.js/pull/27121#discussion_r668178408).

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-12 19:58:03 +00:00
Nick Babcock
5629223407
Update examples to use React 17 (#26133)
[With next 11 requiring react 17](https://nextjs.org/blog/next-11#upgrade-guide), most of the examples
need to be updated, so the following snippet updated all the examples to
a compatible react version.

```bash
cd examples/
fd -g 'package.json' | xargs sed -r -i 's/"react": ".*"/"react": "^17.0.2"/
fd -g 'package.json' | xargs sed -r -i 's/"react-dom": ".*"/"react-dom": "^17.0.2"/'

# exclude experimental react version
git checkout with-reason-relay/package.json
```
2021-06-16 16:43:26 +00:00
Joe Haddad
f17d435166
Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
Luis Alvarez D
30870b444a
[Examples] Add SWR to api-routes and api-routes-middleware (#11385)
* Updated the api-routes-middleware example

* Updated the api-routes example
2020-04-07 09:49:59 -04:00
Josiah Wiebe
fe4da73469
feat: update api-routes example to SSG (#11019)
* feat: update api-routes example to SSG

* Update examples/api-routes/components/Person.js

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-03-12 17:55:24 -05:00
Joe Haddad
5205695578
Switch all examples to next@latest (#7806) 2019-07-08 18:41:33 -04:00
Lukáš Huvar
264fc01969 API routes documentation (#7562)
* API routes examples and documentation

* Update examples/api-routes-micro/README.md

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Update examples/api-routes/README.md

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Apply suggestions from code review

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Update API routes docs

* Improve example to reflect dynamic routes

* Update readme to reflect API routes changes

* Apply suggestions from review
2019-07-07 23:04:04 -07:00