Commit graph

1364 commits

Author SHA1 Message Date
Oxicode
7d2ff81207
fix variable (#12114) 2020-04-22 20:32:41 +02:00
Vania Kucher
39d9476992
Avoid bugs with native Date class (#12098) 2020-04-22 11:43:07 +02:00
dzigg
06f379ffad
Fix typo in example (#12094)
Line 4: "...special configuration file `next.js.config` and..."
Is it meant to be `next.config.js`?
2020-04-22 01:19:53 -04:00
Dustin Deus
d28ad8805a
Rosetta i18n example (#11841)
* add rosetta example

* add comment

* add example for ssr

* add debug example, rerender when i18n keys are added

* output active locale, fix interpolation, fix cases for SSR and CSR

* add useful comments

* address pr issues

* update name in readme

* improve wording

* rename folder

* fix prop typo, add redirects

* load specific i18n json file in getStatisProps
Dashboard dont use any ssr technique

* use ext

* improve example

* Updated example

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-21 12:49:18 -05:00
Joe Haddad
3fe4cbc677
Add Experimental React Refresh Example (#12081)
* Add Experimental React Refresh Example

* add basic readme
2020-04-21 12:28:09 -04:00
David Pike
600b78c098
fix postcss.config.js warnings (#12070)
* update postcss.config.js to fix warnings

Return empty array if the condition is not met to avoid a null/undefined PostCSS plugin.

Related PR: https://github.com/zeit/next.js/pull/11366

* style: correct linting error
2020-04-21 14:51:16 +02:00
Tim Neutkens
483bd3ddda
Rename ZEIT to Vercel (#12075)
* Find/replace

* Update more URLs

* More rename

* Fix remaining examples

* More updates

* Update create-next-app

* Update remaining text

* Update

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-21 11:47:12 +02:00
James Mosier
dc4e5695aa
(examples) Fix link in with-passport example README (#12056)
* Fix incorrect link in with-passport example

Closes #11961

* hardcode link for with-passport README

* fix link

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

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-04-20 20:28:12 +02:00
退之
5592e64c36
Fix with mobx (#11907)
* fix: with-mobx

* refactor: up link

* refactor: npm run prettier-fix

* refactor: server side render

* Updated store implementation and pages

* Updated readme

Co-authored-by: wangcheng <wangcheng@deepblueai.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-20 13:05:10 -05:00
coktopus
a6beed01eb
bug: error when using transition property in tailwindcss + emo… (#12027) 2020-04-20 11:12:13 +02:00
Rounak Agarwal
2c0ed5e80c
[Examples] Update draft-js to v0.11.5 and add editorKey prop i… (#12011) 2020-04-20 11:05:09 +02:00
Francisco Pizarro
4b3967fa10
examples/with-react-helmet: upgrade react-helmet to v6.0.0 (#12000) 2020-04-18 13:09:10 -05:00
Justin
fe686b30b4
with-iron-session: fix link to next-iron-session (#11974) 2020-04-17 17:18:50 -05:00
Luis Alvarez D
42a328f3e4
Improved steps for examples/cms-prismic (#11935)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-16 09:15:43 -05:00
Vincent Voyer
90ffdcc33b
docs(auth): add with-iron-session to the alternatives list (#11903)
Following https://github.com/zeit/next.js/pull/11865#issuecomment-613663718
2020-04-15 02:01:40 -04:00
Matt Carlotta
ffa4089b18
Update with-redux-thunk example to include HMR (#11816)
* Update with-redux-thunk example to include HMR

* Update README

* Fix clock component

* Fix example component

* Fix README
2020-04-14 18:36:50 -05:00
Luis Alvarez D
4094dfeff9
Remove with-cookie-auth (#11865) 2020-04-14 11:58:26 +02:00
Tim Neutkens
f0422f2119
Revert "minor change in hello-world/package.json" (#11874)
This reverts commit 287961ed91.
2020-04-14 10:11:15 +02:00
Luis Alvarez D
20f6429643
Replaced express with next-connect (#11747) 2020-04-13 18:11:41 -05:00
Hoang Vo
ee372f472f
feat(example): add CRUD example with next-connect and passport (#11359)
* Add with-next-connect example

* Update README

* Fix code and lint

* Fix typo

* Run prettier

* Include username

* Rename example

* Match with-passport styling

* Add comments in code

* Run prettier

* Rewrite example

* Add some comments

* Update README.md

* keys -> secret

* Updated package.json and readme

* UX changes

* Securely encrypt cookie with @hapi/iron

* Update README

* Abstract db related actions and update README

* security: add note on password hashing

* remove unused dep

* Updated readme

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-13 18:07:54 -05:00
Yuki Takemoto
65335155d1
chore(example): Update styled-components to v5 in with-typescript-styled-components (#11766) 2020-04-13 17:30:17 -05:00
a14m
0ccce7271d
Update sentry example (#11701)
* Fix the with-sentry-simple example configuration code

This fixes the following issues:
- https://github.com/zeit/next.js/issues/8873
- https://github.com/zeit/next.js/issues/11642

* Update the README with the info about uploading to sentry configurations

* Fix the typo in SENTRY_DNS -> SENTRY_DSN
2020-04-13 14:08:56 -04:00
Fabian Mastenbroek
9e75162a27
[examples/with-react-intl] Fix issues with Intl.js polyfill (#11806)
* Add workaround for Intl.js RegEx issue

This change adds a workaround for an issue with the Intl.js polyfill
library where it instantiates an invalid regular expression.

Relevant issues:
https://github.com/andyearnshaw/Intl.js/issues/270
https://github.com/andyearnshaw/Intl.js/issues/256
https://github.com/andyearnshaw/Intl.js/issues/306

Until this issue is fixed upstream, we use a workaround in the example.

Fixes: #11777

* Do not load Intl.js polyfill by default on Node

This change updates the `with-react-intl` example to prevent it from
polyfilling `Intl` in a Node environment when it is not needed.
2020-04-13 13:55:30 -04:00
MicrochipQ
ccefab76dd
[examples/custom-server-fastify] Fix ts(2341) (#11844)
* Fix ts(2341)

Property 'handleRequest' is private and only accessible within class 'Server'.ts(2341)

* Update server.js

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-04-13 13:41:38 +02:00
Minh Nguyen
ec76d9265c
Rename functional component -> function component (#11850)
See the following for context:

- https://reactjs.org/docs/components-and-props.html#function-and-class-components
- https://overreacted.io/how-are-function-components-different-from-classes/
- https://twitter.com/dan_abramov/status/1057625147216220162
- https://twitter.com/kentcdodds/status/1136274289965928448
2020-04-13 11:33:06 +02:00
liulanz
287961ed91
minor change in hello-world/package.json (#11830) 2020-04-11 23:19:53 +02:00
liulanz
f1e561b889
Update dependencies (#11833)
* updated npm dependencies

* updated npm dependencies

* updated npm dependencies
2020-04-11 23:18:40 +02:00
Abdul Rauf
bbe7a52bd2
update dev script in examples/using-preact (#11805) 2020-04-10 13:59:17 +02:00
Tim Neutkens
c59d24055d
Add Prismic Example (#10897)
* Add Prismic Example

* Update package.json

* Update constants

* Remove react-datocms

* Add Preview Mode for Prismic

* Add support for Preview Mode

* Delete author.jpg

* Delete image.jpg

* Fixes and readme updates

* Fixed issues with preview mode

* Updated preview mode steps

* Added more posts

* Updated readme

* Updated readme

* Added demo URL

* Added related examples links

* Added example to docs

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-10 12:41:09 +02:00
Rounak Agarwal
0c2a6d8f48
fix typo (#11786) 2020-04-09 12:54:59 -05:00
Stig Kleppe-Jørgensen
28e1be83df
Remove duplicate content (#11750) 2020-04-09 10:29:34 +02:00
Yuki Takemoto
a35ae240c4
chore(example): Update styled-components to v5 (#11765) 2020-04-08 19:41:06 -05:00
Zack Krida
1d21897982
Update start script in preact example (#11763)
As far as I understand using preact in Next.js no longer requires a custom server. The current start command `"start": "NODE_ENV=production node server.js"` references a file that no longer exists.
2020-04-08 19:34:54 -05:00
sdhani
7e39079462
Minor with-docker readme grammar fix (#11760)
* Fix with-docker readme grammar

* Amended with-docker readme grammar fix

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

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-04-08 19:07:12 -05:00
Luis Alvarez D
282f375189
[Examples] Update with-mobx-state-tree examples (#11736)
* Updated with-mobx-state-tree

* Updated with-mobx-state-tree-typescript

* minor fix
2020-04-08 09:44:28 +02:00
David Janda
17384fc064
Updated with-xstate (#11658)
* Replaced getInitialProps with SSG

* Removed getStaticProps

* Apply suggestions from code review

Remove count

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-04-07 15:26:05 -05:00
David Janda
44b7b3c953
Updated with-webpack-bundle-size-analyzer to use SSG (#11657)
* Replaced getInitialProps with SSG

* Moved faker to a top level import and re-added contact.js
2020-04-07 13:20:50 -05:00
Vincent Voyer
009369a9aa
docs(examples): add with-iron-session example (#10973)
This example creates an authentication system that uses a **signed and encrypted cookie to store session data**. It relies on [`next-iron-session`](https://github.com/vvo/next-iron-session).

It uses current best practices as for authentication in the Next.js ecosystem:
1. **no `getInitialProps`** to ensure every page is static
2. **`useUser` hook** together with [`swr`](https://swr.now.sh/) for data fetching

Features:
- Logged in status synchronized between browser windows/tabs
- Layout based on logged in status
- All pages are static
- Session data is signed and encrypted in a cookie
2020-04-07 10:47:00 -04:00
viz
9f27259425
chore(deps): remove next-css from examples/antd (#10804)
* chore(deps): remove next-css

* Update examples/with-ant-design/package.json

Co-Authored-By: Jack <jacklee82814@gmail.com>

* Update examples/with-ant-design/pages/_app.js

Co-Authored-By: Jack <jacklee82814@gmail.com>

* chore(lint): fix a linting error

Co-authored-by: Jack <jacklee82814@gmail.com>
2020-04-07 10:40:11 -04:00
Luis Alvarez D
1eefd006a8
[example] Add SWR to api-routes-graphql (#11383)
* Updated example

* Removed isomorphic-unfetch
2020-04-07 09:51:02 -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
Luis Alvarez D
bf0f9da9db
[Example] Remove SSR from with-cerebral (#11562) 2020-04-07 09:48:32 -04:00
Luis Alvarez D
1239d5af59
[Examples] Update mobx examples to not use SSR (#11576)
* Updated with-custom-reverse-proxy

* Updated readme of with-env-from-next-config-js

* Updated the kea example

* Updated with-mobx

* Updated with-mobx readme

* Updated the with-mobx-react-lite example
2020-04-07 09:48:13 -04:00
Yuki Takemoto
7e556c75d7
Remove outdated sentence from static-export example (#11708) 2020-04-07 12:03:03 +02:00
kkobiela
7227824b4a
Update dependencies (#11707) 2020-04-06 13:37:54 -05:00
Paul van Dyk
19f41c60bc
Update postcss.config.js (#11366)
* Update postcss.config.js

Return empty array if the condition is not met to avoid a null/undefined PostCSS plugin.

* Update postcss.config.js

Fix array spread

* Update postcss.config.js

remove extra operator

* Fix linting

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-04-06 12:06:06 +02:00
Fabian Mastenbroek
20f2b0b3b2
Add example for polyfilling DOMParser in Node (#10782)
This change updates the README of the `react-intl` example to show how to use
the FormattedHTMLMessage component from `react-intl` in Node environments when
using pre-v4 versions.
2020-04-06 12:03:10 +02:00
Nathan Sculli
fa39b311ec
A little bit of maintenance on the ReasonML examples (#11662)
* Add babel-types package

`next dev` was failing with:

```
Error: Cannot find module 'babel-types'
```

* Upgrade to the latest bs-platform

Also add the `babel-types` package to stop the `next dev` command from complaining.

* Remove extraneous babel-plugin-bucklescript dependency.

Seems the dependency has been deprecated, and it doesn't seem to be required
anyways.
2020-04-06 10:44:01 +02:00
Tal Ater
89b69865fb
Fix documentation link in Basic API routes example (#11671)
Link to description of API Routes in the main README of the repo is broken. Replaced with a link to the documentation.
2020-04-05 13:46:48 +02:00
Alejandro
d46a0aef0f
Integrate with-atlaskit (#11269)
* Add with-atlaskit

* Fix

* Fix

* Add babel
2020-04-05 13:27:49 +02:00