Commit graph

1728 commits

Author SHA1 Message Date
John Doe
2280031915
Create _document.js to include current language in HTML tag (#16360)
* Create _document.js

 Includes the lang attribute with current language inside the <html> tag.

* Lint fix

Co-authored-by: Luis Alvarez D <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-09-02 09:50:08 -05:00
WeichienHung
aa568a549e
force persistor persist again after persistStore bootstrap done (#16085)
This PR is to fix "[Examples] Problem with query parameters in with-redux-persist (#15484)"
The root cause is 
persist/rehydrate action will issue twice when query parameter is set. But persistStore initial bootstrap is not ready yet. So i add a bootstrap callback and force persistor to persist again to make overall state correct. I also modify the loading prop to a `<div>loading</div>` because it's confuse to set Component in loading prop. 

Attached the GIF
![demo](https://user-images.githubusercontent.com/1462027/89922530-bec04000-dc31-11ea-9831-12cd9d436d96.gif)

Closes #15484
2020-09-01 23:48:56 +00:00
Yichi Zhang
9e4bb5a129
Add Fast Refresh Demo (#16576)
Closes #16538 

Basically reverts #16497 and some minor changes. Also adds a link in the docs.

This reverts commit ec281df70b.
2020-09-01 23:27:57 +00:00
Joris
808d6b94eb
[EXAMPLE] with-framer-motion: fix broken images (#16714)
* refactor: remove useless console.log

* fix: replace broken images

* Updated title

Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-09-01 13:03:41 -05:00
Long Ho
6f60a22377
fix: fix hashing algo and locale value hydration (#16692)
- Fix hashing algo for extraction so it's the same as babel config
- Fix locale persistence issue
fix #16689
2020-09-01 01:33:24 +00:00
Jesse Jafa
ce994365b7
Add cross-env to ensure examples work on Windows 10 (#16694)
Closes https://github.com/vercel/next.js/issues/16693
2020-08-30 06:53:29 +00:00
Patrick Krawczykowski
ba2fbc2b65
Update _app.js to use a function component. (#16683)
This PR updates the `_app.js` file to remove the `next/app` import. It's not needed with the latest versions of Next
2020-08-30 03:23:42 +00:00
Joe Haddad
f17d435166
Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
NorbertLuszkiewicz
c03d4931de
Simplify example usage instructions (#16678)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-29 22:22:02 -04:00
Sakito Mukai
97d8e07f95
[Example] fix with-firebase-hosting (#16577) 2020-08-29 22:17:16 -04:00
Jesse Jafa
694ccc7ca0
Upgrade typescript to 4.0 (#16673) 2020-08-29 22:17:02 -04:00
Soichi Takamura
04c990678e
Update with-typescript-graphql (#16101) 2020-08-29 22:15:50 -04:00
Joe Haddad
624b748de2
Add missing gitignore files 2020-08-29 21:55:58 -04:00
NorbertLuszkiewicz
7e731a8db2
Update README.mb (#16676)
Remove the manual download option
2020-08-30 00:42:40 +00:00
Daniel Eden
a2d83952c1
Add with-mdx-remote example (#16613)
This change adds a new example, `with-mdx-remote`, which leverages [`next-mdx-remote`](https://github.com/hashicorp/next-mdx-remote) to use MDX files as content for a dynamic route.

In addition to the basic functionality, the example adds a note about somewhat advanced usage that allows the use of conditionally-loaded custom MDX components.

cc @jescalan
2020-08-29 01:22:35 +00:00
Vic Vijayakumar
48b3f8e899
Update with-tailwindcss example (#16370)
Updated `examples/with-tailwindcss` to the newest TailwindCSS, and opted in to future-facing breaking changes.

Also created a jsconfig.json so that files can be imported without traversing up relative paths.
2020-08-27 23:54:12 +00:00
Long Ho
5a478b4eef
feat: upgrade react-intl workflow in example (#16215)
Changes:
- Migrate to TypeScript. `react-intl` natively supports TypeScript now.
- Upgrade corresponding `formatjs` packages.
- Dynamically polyfill Intl API per locale since those polyfills are huge.
- Migrate to recommended workflow per https://formatjs.io/docs/getting-started/application-workflow
2020-08-27 22:59:33 +00:00
Hyeon Kim (김지현)
35a90d0e0c
examples/with-styled-components: Fix missing peerDependency (#16532)
styled-components requires 'react-is' as a peerDependency

###### Reference
- https://github.com/styled-components/styled-components/blob/b19d17f/packages/styled-components/package.json#L78
2020-08-25 04:56:03 +00:00
Luis Alvarez D
dd4b9dab63
Update environment variables example (#16536)
Should be able to help with: https://github.com/vercel/next.js/discussions/16530
2020-08-24 23:37:56 +00:00
Ondřej Chrastina
a856097402
Add Kontent example (#16034)
Hello everyone!

I would like to add the example using [Kentico Kontent](https://kontent.ai) as a data source for your example.
I have tried to be consistent with the other examples and showcase the preview as well.

I have tried to keep up with [Contribution guidelines](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples).

Thank you.
2020-08-24 22:58:53 +00:00
Luis Alvarez D
333a9ea8ab
Documentation updates (#16503)
Fixes https://github.com/vercel/next.js/issues/16502

Check the issue for more details.
2020-08-24 02:23:12 +00:00
WeichienHung
c97e53efe1
basePath should also append in urlPrefix (#16376)
Fix https://github.com/vercel/next.js/issues/16197

See my screenshot. Testing url is changed to http://localhost:3000/test and can find the source map.
<img width="826" alt="圖片" src="https://user-images.githubusercontent.com/1462027/90737991-d74eeb00-e300-11ea-9675-f25aef6a4062.png">
2020-08-24 02:00:43 +00:00
Luis Alvarez D
ec281df70b
Remove experimental example (#16497)
@Timer This example seems to not be needed anymore
2020-08-23 18:33:34 +00:00
Diego Gennaro
85d58298a3
Add example: Unsplash integration (#16142)
* nextjs with unsplash initial commit

* update demo link

* remove isomorphic-unfetch

* remove ssr on collection page

* fix style issues

* fix import/no-anonymous-default-export

* usign fetch instead of request

* remove credits

* improve instructions

* improve instructions

* Updated readme steps and images

* Updated readme

* Updated gitignore

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-08-22 16:02:49 -05:00
Todor Totev
b0d2a80a18
[Examples] Remove horizontal scroll in CMS examples (#16295) 2020-08-18 11:31:20 -04:00
Vishnu Sankar
17aa4b458e
Added next-sitemap example (#15997)
Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-08-18 00:16:42 -04:00
Kristoffer K
2e6bc8eba4
ci: add pnp test (#16255) 2020-08-17 13:39:57 -04:00
Rafael Almeida
521cc621d8
Update Storybook examples to v6.0 (#16139)
* Update with-storybook example

* Delete with-storybook-typescript example

* Add TypeScript section to the README

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-15 15:42:17 -05:00
Artem Zakharchenko
746000ea5e
Add MSW usage example (#13731)
* Add MSW usage example

* Updated example

* Added .gitignore

* Added .gitignore in the right place lol

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-08-14 11:47:54 -05:00
Thorsten Schaeff
bdc465092b
examples: Add with-supabase-auth-realtime-db example. (#16016)
r? @lfades @timothyis  
cc @kiwicopple @awalias

Adding a realtime chat example showing how to implement authentication and realtime data syncing with supabase.io :)
2020-08-13 05:03:09 +00:00
madiknox
604ca6c61d
removed renderToHTML from ssr-caching and custom-server-hapi in examples (#16138)
Fixes #14737
2020-08-13 04:43:46 +00:00
madiknox
d81ace268a
removed renderToHTML definition from with-flow example (#16137)
This is my very first PR, I'm hoping to contribute more. Should I also remove `renderErrorToHTML` and `renderError`?

#14737
2020-08-13 04:21:27 +00:00
khasty720
c154a878b6
Add with-reactstrap example (#15474)
## Summary
This PR adds a Next.js example using [Reactsrap](https://reactstrap.github.io/)
2020-08-12 06:25:47 +00:00
Andrew Nagy
2301331703
Add stripPrefix of webpack://_N_E/ (#15955)
In with-sentry add stripPrefix of `webpack://_N_E/`. This removes the `webpack://_N_E/` prefix from the stack trace which will help Sentry to understand what is "App Only" vs "Full"

I'll fully tested calling errors in browser and the stack traces are still aligned and linked correctly. This just gets rid of the extra data in the front which seems to be the same for everyone and I believe it comes from webpack 5 (?)
2020-08-11 17:49:34 +00:00
anotherjsguy
9e70b3de44
update with-filbert-js (#15968)
- Update dependencies for filbert-js
- Add `@filbert-js/macro` example
2020-08-11 03:21:19 +00:00
Francis Rodrigues
4c3d3b7122
Fix: with-firebase-authentication event listener (#16057)
Reference to discussion https://github.com/vercel/next.js/discussions/16010
Bug fixes to `with-firebase-authentication` example that enter in a loop `maximum update depth exceeded errors` becase of the `onIdTokenChanged` Firebase auth method.
I added a clean up event listener.
2020-08-11 01:05:42 +00:00
Dustin Deus
4b2a8253b9
Fix with-i18n-rosetta example (#16023)
* fix

* fix unstable useeffect dep

* FIxed lint issue

Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-10 16:11:11 -05:00
Riccardo Di Maio
394e24073d
Typo fix (built time -> build time) (#16006) 2020-08-08 17:23:25 +00:00
Riccardo Di Maio
bdaedd220a
Remove another broken demo link from with-graphql-faunadb (#16007)
The link used to appear twice in the README, but it has only been removed once (#15267) to fix #15219. This commit removes the other link to the broken demo.
2020-08-08 17:05:29 +00:00
Kazuhito Hokamura
7a9ee4b9e5
Update Sentry example to improve display of server errors (#15495)
In the Sentry example, sourcemaps is not enabled in server error.

I solved this problem by using `RewriteFrames`. On the client side, the sourcemaps path is `~/_next`, but on the server side it needs to be `~/.next` (distDir), so I rewrite it using the `iteratee`.

ref. https://docs.sentry.io/platforms/node/sourcemaps/#updating-sentry-sdk-configuration-to-support-source-maps

-----

## before
<img width="983" alt="ss2" src="https://user-images.githubusercontent.com/39471/88479997-29188580-cf8e-11ea-8d16-10ccfa6fc1a4.png">

## after
<img width="989" alt="ss1" src="https://user-images.githubusercontent.com/39471/88479995-26b62b80-cf8e-11ea-8b1f-7784b32b9e6d.png">
2020-08-07 07:22:08 +00:00
Sven Anderson
db69e4747a
example application on Redis (Lambda.store) (#15532)
This example application guides you to build a next.js application and integrate lambda.store as data store. See readme for details.
2020-08-07 01:34:02 +00:00
Arsalan Khattak
ebd1434a84
Add PWA Example (#15433)
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-08-06 13:14:35 -04:00
Raibima Putra
3922fa0584
with-react-native-web: move meta viewport to _app.js (#15945) 2020-08-06 12:35:03 -04:00
Joe Haddad
817d558a6d
Add missing gitignore 2020-08-06 00:07:15 -04:00
Aubrey
7d8e0c512f
updated active-class-name example to also demo a [slug] path (#15924)
updated example for [active-class-name](f00ad581a1/examples/active-class-name) to also support a `[slug].js` page that matches on `as` instead of `href` (as `href` would be `/[slug]`)

> This does not demo `[..slug].js` as this requires possible custom code for determining the slug path part for the active classname. i.e. page tree active nodes. A possible other example or another PR on this example.

Has possible information for:
 * https://github.com/vercel/next.js/issues/7410
2020-08-06 01:26:48 +00:00
Luis Alvarez D
c11ee1d857
[Examples] Remove horizontal scroll in CMS examples (#15921)
This is the same fix from https://github.com/vercel/next.js/pull/15729 - Adding it in a new PR as I can't update the current one.

Closes #15729
Fixes #15676
2020-08-05 22:39:44 +00:00
Robin Tom
5218e76818
Example for Redirects (Custom routes) (#15411)
This PR adds example for #15073 
> - [ ] `redirects` For [docs/api-reference/next.config.js/redirects.md](https://github.com/vercel/next.js/blob/canary/docs/api-reference/next.config.js/redirects.md)
2020-08-05 22:20:49 +00:00
Mikkel Laursen
9ef0fae889
[Examples] Update react-md examples for v2 (#15723) 2020-08-05 14:24:20 -04:00
Jack Clackett
026785d5ad
Update with-apollo examples to merge existing cache (#15804) 2020-08-05 11:30:29 -04:00
Aleksander
8703f134de
Fix awaiting for sync method of remark in cms examples (#15555) 2020-08-05 11:30:04 -04:00