Commit graph

919 commits

Author SHA1 Message Date
yhirano55
f29d6671bf Update with-asset-imports [ci skip] (#4365)
* Add name, version, license to package.json
2018-05-14 00:29:39 +02:00
yhirano55
82e77a8838 Update ssr-caching example (#4363)
* Remove unnecessary dir key from next's argument
* Add license section to package.json
2018-05-14 00:00:37 +02:00
yhirano55
8512bf49f7 Update pass-server-data example [ci skip] (#4362)
* Update react, react-dom major version
* Add license section to package.json
* Use isomorphic-unfetch instead of isomorphic-fetch
2018-05-14 00:00:03 +02:00
Gaston Fartek
4f59c95149 updating with-redux-saga example (#4356) 2018-05-13 18:26:17 +02:00
yhirano55
af1082286e Fix class name in data-fetch example (#4358)
* Fixed class name in data-fetch example
* Removed needless empty lines
2018-05-13 18:12:03 +02:00
yhirano55
b2047de51a Update package.json in with-docker example (#4359)
* Added name, version, license keys.
2018-05-13 18:10:00 +02:00
yhirano55
8c5c2c23bb Update babel-plugin-module-resolver version in with-global-stylesheet (#4360)
I found build error, so I've updated babel-plugin-module-resolver
2018-05-13 18:09:25 +02:00
yhirano55
b3e47d19f8 Update README in with-global-stylesheet-simple [ci skip] (#4361)
Use https instead of http for tachyons URL
2018-05-13 18:08:44 +02:00
Petr Messner
fa5c0b8a47 Fix example with-custom-babel-config: update to Babel 7 (#4349)
The option `"decoratorsLegacy": true` seems mandatory, fails without it:

> The new decorators proposal is not supported yet. You must pass the `"decoratorsLegacy": true` option to @babel/preset-stage-0
2018-05-13 00:47:56 +02:00
Tim Neutkens
db29791cdc Merge branch 'master' into canary 2018-05-12 20:20:20 +02:00
Tim Neutkens
2c3f40600c Upgrade with-typescript to use latest next-typescript 2018-05-12 13:59:15 +02:00
Karthik Muralidharan
16ff96b107 rename; Clock.js to clock (#4342)
Fixes the compilation error : 

```
* ./clock in ./components/examples.js
ModuleNotFoundError: Module not found: Error: [CaseSensit
ivePathsPlugin] `/components/clock.js` does not matc
h the corresponding path on disk `Clock.js`.
```
2018-05-11 22:08:42 +02:00
Jason Leibowitz
126507cc1c Add Example of Redux Wrapper with Immutable.js (#4327)
* Add immutable redux example

* Updated readme

* Fix linting errors
2018-05-10 19:40:21 +02:00
Pascal Birchler
6b04b55354 Fix typo in next-with-apollo-auth test docs (#4328) 2018-05-10 19:02:29 +02:00
Andrew Razumovsky
0d4d7d840a [with-react-i18next] Fix flickering on page change via <Link /> (#4318)
* Fix flickering on page change via <Link />

* Remove process.browser check
2018-05-09 15:06:37 +02:00
Volker Rose
aec4c00214 Update next-typescript to latest version 0.1.1 (#4176)
This example gave me 404s on `pages/*.tsx` when using it with the latest nextjs (`5.1.0`) and `@zeit/next-typescript@0.0.11`. The latest next-typescript plugin version fixes it.
2018-05-08 17:38:21 +02:00
Kirill Konshin
76f5e979b3 Support _app approach for upgraded Redux Wrapper (#4207)
* Support _app approach for upgraded Redux Wrapper

* Updated according to discussion

* Package.json versions
2018-05-08 14:57:41 +02:00
Michael Hsu
4b95725e09 fix(with-pkg): update pkg config for next.js (#4307)
* fix(with-pkg): update pkg config for next.js

* update docs
2018-05-08 11:52:52 +02:00
Jorge Cuadra
596bd21e33 Add eslint parser to avoid errors in IDE. (#4297) 2018-05-07 21:11:14 +02:00
Tim Neutkens
0697c289f8
Implement with-redux using _app.js (#4295)
* Simplify redux example

* Simplify redux example even more

* Remove empty space
2018-05-07 15:03:54 +02:00
Tim Neutkens
6c0091fb7a
Add new apollo example using _app.js (#4286)
* Add new apollo example

* Update readme

* Update with-apollo to use _app.js

* Move withData to _app

* Make SSR work again

* Remove withData

* Use HOC to provide apolloClient

* Spread pageprops
2018-05-07 15:02:56 +02:00
Tim Neutkens
6bc363e615
Fix with-jest example (#4278)
Fixes #4263
2018-05-05 05:36:59 -07:00
Tim Neutkens
3685c30fb4 Merge branch 'master' into canary 2018-05-05 14:23:05 +02:00
Michael Hsu
738376c812 Add docker example (#4261)
* Add docker example

* fix lint
2018-05-05 04:12:56 -07:00
Tim Phillips
08965008c6 Prevent now-env from running in production (#4259) 2018-05-04 22:14:59 -07:00
Tim Neutkens
62f9736ca3 Add basic export example 2018-05-01 19:06:06 -07:00
Tim Neutkens
f1b9577210 Merge branch 'canary'
# Conflicts:
#	package.json
#	yarn.lock
2018-04-29 11:43:37 -07:00
Tony Kovanen
6158243339 with-reasonml: better setup (#4218)
With this setup we're compiling the .re/.ml files directly to source
directories with a .bs.js extension, and enabling next.js to pick up
that extension for pages.
2018-04-27 08:24:46 -07:00
Tony Kovanen
f378448b79 with-reasonml: use default exports (#4217) 2018-04-26 20:35:30 -07:00
Tony Kovanen
2457df5d06 examples/with-reasonml: use bs-next for Next.Link (#4214)
Fixes #4028
2018-04-26 10:05:04 -07:00
Iago Dahlem Lorensini
a0019b3dc9 Update broken link on with-redux-reselect-recompose example (#4209) 2018-04-25 09:29:48 -07:00
Tim Neutkens
0daf9beedc Add _app layout example 2018-04-24 12:31:26 -07:00
Tim Neutkens
326c84a730 Add readme for componentDidCatch example 2018-04-23 15:07:48 -07:00
Tim Neutkens
65c0014ad1 Add componentDidCatch example 2018-04-23 14:22:36 -07:00
Bhargav Ponnapalli
5187d142ea Added example for usage with rematch (#4095)
* Usage with rematch

* Run lint fix

* Add counter-display example and readme
2018-04-18 14:03:24 +02:00
Fouad Matin
676d82abf9 fix(examples/using-preact): use latest next-preact (#4152) 2018-04-14 07:49:06 +02:00
Harun Đulić
c5c5564dbf Added with-jest-typescript example (#4124)
* Added with-jest-typescript example with files and readme

* Updated package.json

As per the comment, updated the package.json so the info is same as in other examples.

* Proper name in package.json
2018-04-13 16:53:59 +02:00
Prateek Rastogi
fbd023c032 added example of integration with videojs (#4139)
* added videojs integration example

* added videojs example

* lint fix

* Revert "lint fix"

This reverts commit 39010fa0b58a66d06b91987a5bef46c044181470.

* removed unexpected lint fix
2018-04-12 12:22:37 +02:00
Seth Etter
769d8e3a84 Update next-typescript version in custom-typescript-server example (#4130) 2018-04-09 18:41:41 +02:00
Odin Ugedal
c486682b44 Relay modern example fixes (#4120)
* Fix with-relay-modern example

Starting with react-relay 1.5.0 the schema canno't be in the same dir as
the src. This can be fixed by excluding the schema dir. Globs should
also be inside quotation marks, to avoid non-deterministic behavior of
different shells.

* Add missing key on BlogPosts
2018-04-07 12:41:26 +02:00
James Hegedus
f2e56609cd Examples: stabalise README format and create-next-app usage (#4009)
* Examples: clarify language around Yarn create & npx

* add missing READMEs and create-next-app usage

* suggest people tag jthegedus in firebase related issues

* add yarn alt instructions

* cerebraljs example readme & fixes
2018-04-03 14:19:05 +02:00
Tim Neutkens
2d8c19a450
Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major)
2018-04-03 09:34:07 +02:00
Bhargav Ponnapalli
3556a3a63f Added example for usage with rematch (#4095)
* Usage with rematch

* Run lint fix

* Add counter-display example and readme
2018-04-03 09:09:30 +02:00
Tim Neutkens
43fe9ace54 Merge branch 'canary' of github.com:zeit/next.js into canary 2018-03-31 16:07:16 +02:00
Tim Neutkens
c07cf5e83f Upgrade Next in with-firebase-hosting 2018-03-31 16:06:12 +02:00
Jonathan James
b39958e780 Fix serve command (#3989)
* Fix serve command

From the Firebase docs, you must use --only in order to run the local function emulator.
See https://firebase.google.com/docs/functions/local-emulator

* Add production env for firebase serve

Doesn't work without this

* Update text as suggested by @jthegedus
2018-03-31 15:59:24 +02:00
Luis Fernando Alvarez D
b43af823dd Updated example with-now-env (#4081)
* New example: with-now-env

* updated the example with-now-env
2018-03-31 08:17:21 +02:00
Tage A. L. K
b321e6e942 Remove deprected and refactor with-apollo-auth (#4070)
* Remove deprected use of apollo-client-preset, and refactor

Changes
* Remove deprected use of apollo-client-preset in favor of apollo-boost
* Refactor for usage of react-apollo@2.1

* Use standard

Just ran standard --fix
2018-03-31 08:11:36 +02:00
Tim Neutkens
69ca73ca56 Upgrade @zeit/next-typescript in with-typescript example (patch) 2018-03-30 00:07:33 +02:00
Tim Neutkens
069f45d74e Upgrade @zeit/next-typescript in custom-server-typescript example (patch) fixes #4071 2018-03-29 21:06:53 +02:00
Wes Bos
3949c82bdf Add missing url prop (#4078)
This was causing react-apollo  to crash on any SSR page that needed the page's query to make the GraphQL queries. 

It's magically passed on the client, but we have to manually pass it to the composed component here
2018-03-29 18:01:12 +02:00
Pavel Prichodko
2ba8ad9760 Add with-google-analytics example (#4036)
* Rename example with-analytics to with-segment-analytics

* Add with-google-analytics example
2018-03-29 17:03:28 +02:00
Luis Fernando Alvarez D
9f4e707682 New example: with-now-env (#4073) 2018-03-29 00:11:40 +02:00
Will Meier
4570f2d050 Update with-apollo examples (#4067)
* Update with-apollo examples to include note about top-level withData HOC

* Update with-apollo examples to include note about top-level withData HOC
2018-03-28 22:30:42 +02:00
Tim Neutkens
ebf0c47c25
Upgrade standard.js (#4064)
* Upgrade standard.js

# Conflicts:
#	yarn.lock

* Upgrade babel-eslint
2018-03-27 20:11:03 +02:00
Rasool Dastoori
603b90ce02 Fix loading and rendering GraphQL data on the server in the with-apollo-and-redux example (#4054) 2018-03-25 17:40:25 +02:00
Gianmarco
7bef864a6f Fixes install command in with-absolute-imports example. (#4049)
Fixes installation command for `with-absolute-imports` example.
2018-03-23 14:00:18 +01:00
Luke Plaster
a6af11c6ae Improved with-ant-design example (#4034)
* Improved with-ant-design example

* standardjs fix maybe
2018-03-23 12:52:34 +01:00
Prateek Rastogi
9470b91ba1 migrated from apollo-client-preset to apollo-boost (#4047) 2018-03-23 12:51:58 +01:00
Shaleen Jain
cd1d9e0c35 with-apollo: Improve lib/withData (#3973)
* pass down getInitialProps ctx to ComposedComponent
* pass apollo client instance directly to getDataFromTree instead of through the ApolloProvider wrapper.
* Avoid redundant empty serverState initialization (It's always initialized)
2018-03-16 11:52:30 +01:00
James Hegedus
b1d8b839dd Examples: use npx and yarn create to run create-next-app on examples (#4002)
* remove global npm install of create-next-app

* add npx to create-next-app command in examples

* add bash to shell snippets

* add yarn create to next-app command in examples

* fix READMEs named with lowercase

* change READMEs to use UPPERCASE
2018-03-14 09:09:46 +01:00
Wagner Camarao
0eb5bab452 Fix a/b typo in custom-server-typescript routing (#4003) 2018-03-14 09:06:53 +01:00
PetrSnobelt
d391c2a040 Presets should be array (#3996) 2018-03-12 17:30:28 +01:00
Anton Egorov
2d7ba7f489 Remove error handling from custom-server-koa's server example (#3982)
Koa's `listeningListener` callback is invoked with no arguments according to the Koa's type definitions, hence error handling is extraneous.
2018-03-10 12:22:40 +01:00
Saro Vindigni
d3518242a6 FIX deploy with-firebase-hosting (#3946)
* FIX deploy with-firebase-hosting

* add npm run command in place of yarn in firebase.json predeploy hooks

* Change yarn with npm

* firebase-hosting example: Add warning in examples README

* firebase-hosting example: clarify warning language

* firebase-hosting example: remove the warning and upgrade to canary

* firebase-hosting example: actually upgrade pkg.json
2018-03-08 13:54:32 +01:00
Alexander Kachkaev
d5ce7aa3ca Update debug flag in with-react-i18next example (#3964)
Do not set it to true in production
2018-03-07 09:31:03 +01:00
Alexander Kachkaev
2e641e9e8c Use separate tsconfig for server in custom-server-typescript example (#3963) 2018-03-07 09:13:12 +01:00
Alexander Kachkaev
8bd81f6a68 Split exports in with-react-18next example to avoid ambiguity (#3959)
See context in https://github.com/i18next/react-i18next/issues/397
2018-03-07 08:42:14 +01:00
Robin Frischmann
6f0914c788 FIX #3757 update Fela example for Next 5 (#3949)
* #3757 update Fela for Next 5

closes #3757

* add missing props passdown
2018-03-06 14:27:47 +01:00
Ondrej Maksi
359e25af13 extendable with-redux example (#3947)
* copied with-redux -> with-redux-wrapper, changed links in readme

* added simplified redux wrapper

* removed next-redux-wrapper dep

* changed imports to local wrapper

* changed readme to reflect changes
2018-03-06 13:34:28 +01:00
Alexander Kachkaev
a225da4bb1 Fix null pointer exception in with-react-18next (#3944)
The example does not crash if a user chooses a non-existing language (e.g. goes to localhost:3000/?lng=ru)
2018-03-06 10:39:35 +01:00
Alexander Kachkaev
dbb1b732a0 Update with-react-i18next example (#3932)
- simplify pages by introducing withI18next hoc
- add Trans component example
- replace <div> with <p> in demo components to make text on pages easier to read

German translation by @marinaroot
2018-03-05 12:46:13 +01:00
Alexander Kachkaev
39be7183a5 Update custom-server-typescript example (#3936)
- Add "jsx": "preserve" to tsconfig.json
- Rename lib to production-server to remove incompatibility with other examples

Context: https://github.com/zeit/next.js/pull/3838#issuecomment-370189242 and below
2018-03-05 09:49:48 +01:00
James Hegedus
b4b5b1fa6d with-firebase-hosting improvements & fixes (#3886)
* Next.js v5 update, _error & _document bugs fixes

* document clean script

* remove old build artefact

* add babelrc

* reset next.js version to 'latest' from '^5.0.0'

* typo in readme

* format code

* remove _files as they were a fix for a solved, but unreleased problem
2018-02-28 11:54:48 +01:00
Evan Tahler
a39e54c675 custom-server-actionhero (#3905) 2018-02-27 13:16:17 +01:00
Rob
681c055220 Changed code to use the new css & asset imports instead of loading the whole lib from CDN (#3884)
* Changed code to use the new css & asset imports instead of loading the whole lib from CDN.

* Fixed formatting.
2018-02-25 18:57:20 +01:00
Jerome Fitzgerald
5ebb943c84 [example] with-apollo-and-redux-saga (#3488)
* [example] with-apollo-and-redux-saga

- Using Apollo to get GraphQL Data? Dope.
- Using Redux Saga to do other stuff outside of that? Cool.
- Nary the two shall meet? Most likely. 😀️

This is a breakout of #3463 where we were combining Apollo and Redux.

This may not be an example that gets a PR.

Why? Well, the examples are meant to pick and choose and combine
yourself. At least I believe, and this is basically a combination of two
examples (`with-apollo` and `with-redux-saga`) with some reworking.

**pages/**:
`index`: withReduxSaga()
`about`: ()
`blog/index`: withReduxSaga(withApollo())
`blog/entry`: withApollo()

* [refactor] fix lint (again), remove superfluous calls

* [fix] package.json: with-apollo-and-redux-saga

Updated the `name` and made sure `es6-promise` was in dependencies

* [refactor] remove semi-colons in clock/sagas

* [refactor] remove old migration code
2018-02-25 00:17:04 +01:00
Brice BERNARD
206470283e [with-hocs] Revamp example to use real world hocs (#3423)
* Revamp example to use real world hocs

* Add missing sync await parts

* Remove process.browser usage

* Get parent initialProps in last position
2018-02-24 13:04:17 +01:00
Ibrahim Ansari
99fb191286 Add custom-server-typescript example (see #3694) (#3838)
* Add custom-server-typescript example (see #3694)

* Fix linting errors in custom-server-typescript

* Provide proper arguments to ts-node.

* Fix import and fix all linting errors.

* Use import in server as well.

* Update nodemon.json
2018-02-22 16:29:47 +01:00
Tim Neutkens
a10324d591
Merge master into canary (#3846)
* Move security related test cases into a its own file.

* Removes the unused renderScript function

* Add a nerv example. (#3573)

* Add a nerv example.

* Fix for indentation/style

* Fix for name

* Release 5.0.0

* Add multi-zones docs. (#3688)

* with emotion example - hoist styles out of the index page component (#3821)

* Use indexOf instead of startsWith (#3758)

* Use indexOf instead of startsWith

This fixes an IE11 regression, see #3755

* Lint the code
2018-02-19 15:47:50 +01:00
Alexander Kachkaev
97aef52def Update tsconfig.json in with-typescript example (#3837)
Fixes https://github.com/zeit/next.js/pull/3698#issuecomment-366442816
2018-02-18 12:42:22 +01:00
Jan Mühlemann
7a937505f5 update with-react-i18next sample with latest dependencies (#3835) 2018-02-18 12:41:40 +01:00
Abel Tamayo
69b236b976 Upgrade Firebase and Firebase-Admin (#3786)
Firebase and Firebase Admin versions are upgraded.
2018-02-16 11:12:57 +01:00
Jay Phelps
bc185878e8 change mergeMap -> map in redux-observable example (#3794)
Using `mergeMap` with an inner Observable `of` is the same as using `map` by itself, so this is more idiomatic and clear.
2018-02-16 11:01:00 +01:00
Ari Leo Frankel
7b975d2156 examples: Add an example for the next-css plugin (#3739)
- with css modules
- with additional webpack config
- with post css
- without css modules

Fix #3699
2018-02-16 10:59:11 +01:00
AlbertGao
48e6decc2d Fix #3700 Added examples for next-sass (#3729)
* #3700 Add examples for next-sass

* #3700 Use React.Fragments and more

* Fix #3700 remove some keys to make more clear

* Fix #3700, change to without-css-modules

* Replace PageWrapper with _document for more concise code. #3700
2018-02-16 10:51:13 +01:00
Fumihiro Xue
972db9ba43 Fix #3814 (#3815)
* fix: module name typo

* fix: issue #3814
2018-02-16 10:49:25 +01:00
Brent Clark
24d862cd6b Remove console.log derp (#3810)
* fix copy pasta issue

* remove console.log derp

* resolve merge conflicts
2018-02-15 11:02:33 +01:00
thom
ebe39a63e6 Display errors when using glamor/server in a custom document (#3804) 2018-02-14 18:05:02 +01:00
David Calhoun
4469bd056c Fix react-native-web example typo (#3802) 2018-02-14 15:34:35 +01:00
Sitian Liu
6de3ff9d78 Remove redux comment (#3792)
Apollo client 2.0 is no longer implemented with redux
2018-02-13 23:20:22 +01:00
David Calhoun
8b1458af4f Add with-react-native-web example (#3781)
* Add with-react-native-web example

Showcase the required work to use
[react-native-web](https://github.com/necolas/react-native-web) with
Next.js.

* Repair lint warnings
2018-02-13 17:42:31 +01:00
Abel Tamayo
024d0c70ff Update README.md (#3784)
Detailed instructions for configuring authentication.
2018-02-13 13:20:16 +01:00
vuldin
74866edc40 fix setInterval usage in mobx examples to work in firefox (#3769) 2018-02-12 11:02:05 +01:00
Brent Clark
a8d07af355 use null instead of empty string for coerced className (#3771) 2018-02-12 10:10:01 +01:00
Fabrício Matté
e3079187fd Fix with-redux-saga server rendered clock, fixes #3760 (#3762)
Also updated the tick interval to one second, the clock works better this way and this is how the with-redux example is currently implemented as well.
2018-02-11 19:55:16 +01:00
Shogun Sea
7d7deca1b3 With redux example clock interval fix (#3756) 2018-02-11 13:36:33 +01:00
Ángel M
2ba6a9aff7 Fix svg-components example and improve babel example file (#3746) 2018-02-09 15:41:09 +01:00
astenmies
b8076a84a0 With DraftJS example (#3736) 2018-02-09 09:40:32 +01:00
Tim Teeling
1b473e478d Fix with-polyfills example for Next 5 (#3740) 2018-02-09 09:31:30 +01:00
Yevhen Uzhva
73bf0ab162 [Fix] with-global-stylesheet example (#3741) 2018-02-09 09:29:10 +01:00
Bonggyun Lee
87ab61eba5 example/with-typescript (#3698)
* example/with-typescript2

* apply standard js style

* remove unnecessary file & code

* fix link url

* replace with-typescript
2018-02-06 11:06:48 -05:00
Olivier Tassinari
9404beb12f Use latest instead of zones for with-zones example (#3710) 2018-02-06 10:09:01 -05:00
Romain Quellec
2a845a61b7 Correct url to blog post (#3709) 2018-02-06 15:22:32 +01:00
Olivier Tassinari
2473b55871 [ssr-caching] Only cache 200 status requests (#3708)
* [ssr-caching] Only cache 200 requests

I'm assuming caching an error page is a bad pattern.

* Update server.js
2018-02-06 17:51:49 +05:30
Juan Campa
efed85e495 Fix webpack-bundle-analyzer example to work with Next 5 (#3692) 2018-02-06 12:48:38 +05:30
Sitian Liu
905ff32b7f Create example using custom charset (#3697)
https://github.com/zeit/next.js/issues/3401
2018-02-06 12:22:31 +05:30
Tomáš Witek
9498fc60a1 Use correct port in with-zones example (#3679) 2018-02-05 12:05:59 +01:00
Tim Huff
31b8e7ed47 Indicate how to import fonts (#3676)
Got this fix from issue #2302. Libraries like `font-awesome` are pretty common. Indicating how to get them to work should be indicated in the `README.md` (if not added to the example)
2018-02-05 10:43:43 +01:00
M Pacer
3bbfbfad5c Refactor redux observable example (#3495)
* move imports into files using lettable operators, remove rxjs-library

* refactor to be more in keeping with redux conventions

from the single reducer.js, I split the functionality into actionTypes
(actionTypes.js), actions (actions.js), and epics (epics.js). Most of
the fetching should be done in an epic, but that requires introducing a
new action and so was
better in a separate commit.

* switch to fetching on the front-end via an epic

The fetching previously was triggered using an api call that had side
effects, but was triggered from inside of an epic and was not an action.
Now calls on the front-end all of the api calls are occuring via an
action through fetchCharacterEpic. This does not remove the api.js file
as I have not yet been able to get the epic to trigger correctly on the
server-side, thus the api.fetchCharacter call is awaited in
getInitialProps for initialising the state serverSide.

* remove need for the serverSide api by directly handling the dispatch

This still seems to be an incomplete solution to the problem as it
circumvents the standard redux event flow on the serverside. However, it
does obey the spirit of the redux event flow (as it passes an Observable
of an action into the epic to then trigger other actions). Additionally,
this removes the problem of code duplication.

* update README.md and move lib/ to redux/

* Fix linting
2018-02-04 12:56:32 +01:00
Jon Espen Kvisler
4d9cf1940c [with-apollo] Use getDataFromTree in browser (#3457)
* use getDataFromTree in browser

* formatting

* removed ssrMode argument, not needed
2018-02-04 12:36:35 +01:00
Arunoda Susiripala
97cf4281dc [Example] with-polyfills : show how to load polyfills (#3568)
* Add an example showing how to use polyfills.

* Add some example polyfills.

* Fix a typo.
2018-02-04 11:50:48 +01:00
John Polacek
b50c596d06 Format subhead in gh-pages README example (#3670) 2018-02-03 20:03:47 +01:00
Chris
7afc008aa7 Example: Passing data from server through API (#2594)
* Add example on how to pass data through js api during SSR

Requested in #1117

* Use content negotiation instead of a separate route

* Codereview feedback

* Move security related test cases into a its own file.

* Removes the unused renderScript function

* Add a nerv example. (#3573)

* Add a nerv example.

* Fix for indentation/style

* Fix for name
2018-02-03 17:11:47 +01:00
John Polacek
d103345aa1 Fix typos in gh-pages example README (#3669) 2018-02-03 17:11:16 +01:00
Frank Dai
f046c0f6c2 Fixed the example with-react-intl, cannot read property 'locale' of undefined (#3392) 2018-02-02 20:13:05 +01:00
Luis Fernando Alvarez D
80fc0f4511 (custom-server-express) avoid a 404 when navigating to a custom route (#3645)
* next export will expand symlinks now

* Make sure next export doesn't includes _document.js in windows

* avoid a client side not found page when navigating to a custom route
2018-01-31 22:38:36 +01:00
Tim Neutkens
f0703f8e13 Update preact example 2018-01-31 11:19:34 +01:00
Tim Neutkens
6db44f8058 Deprecate css examples 2018-01-31 11:19:34 +01:00
Jerome Fitzgerald
ab889369d5 [fix] apollo-redux: Separate out entire example #3463 (#3629)
* [fix] apollo-redux: Separate out entire example #3463

Apollo and Redux are completely separate ways of managing state. This example serves as a conduit if you were using Apollo 1.X with Redux, and are migrating to Apollo 2.x, however, you have chosen not to manage your entire application state within Apollo (`apollo-link-state`).

There is no "withData" function that allows you to call either/or. You must call "withRedux" and/or "withApollo" on your Component. They can be combined in the example at `index.js` or remain separate as seen in `apollo.js` and `redux.js`.

Going forward, this example may go the way of the dodo.

* [chore] reformat code to match next syntax

Localize prettier sometimes has a mind of its own. 😄️

* Fix linting
2018-01-31 10:40:32 +01:00
Brice BERNARD
053a248c44 [with-portals] Remove dynamic import, add <Portal /> (#3571) 2018-01-31 10:35:59 +01:00
Stephen Mathieson
9165d753d0 Add an example using analytics (#3580)
This patch adds an example of a Next.js app using analytics. A custom
document injects the [Segment](https://segment.com) bootstrapping
snippet into the `<head>`, allowing "page" and "track" calls to be made.

An issue came up in CNA asking how we handle this in our apps (see
https://github.com/segmentio/create-next-app/issues/24), so I figure an
"official example" could help.

NOTE: I am affiliated with Segment.
2018-01-31 10:35:27 +01:00
Logan McAnsh
4965387a3c add Polka server example (#3588)
* add Polka server example

* Update package.json

* Fix linting
2018-01-31 09:24:38 +01:00
Sergio Xalambrí
99272808d9 Update custom-server-micro example to latest version (#3594) 2018-01-31 09:22:43 +01:00
Alex Indigo
e401e2cf5f Added IoC example (#3595)
* Added `with-ioc` example

* pre-compile deps until we get nextjs magic working
2018-01-31 08:36:20 +01:00
Tim Neutkens
9a82ca4029 Update Next.js version on examples 2018-01-30 21:46:15 +01:00
Matías Hernández Arellano
c4830c3a61 upgraded flow version and updated code to use of React.Node (#2) (#3635) 2018-01-30 21:11:37 +01:00
Tim Neutkens
e093441bad Universal Webpack (#3578)
* Speed up next build

* Document webpack config

* Speed up next build

* Remove comment

* Add comment

* Clean up rules

* Add comments

* Run in parallel

* Push plugins seperately

* Create a new chunk for react

* Don’t uglify react since it’s already uglified. Move react to commons in development

* Use the minified version directly

* Re-add globpattern

* Move loaders into a separate variable

* Add comment linking to Dan’s explanation

* Remove dot

* Add universal webpack

* Initial dev support

* Fix linting

* Add changes from Arunoda's work

* Made next dev works.
But super slow and no HMR support.

* Fix client side hot reload

* Server side hmr

* Only in dev

* Add on-demand-entries client + hot-middleware

* Add .babelrc support

* Speed up on demand entries by running in parallel

* Serve static generated files

* Add missing config in dev

* Add sass support

* Add support for .map

* Add cssloader config and fix .jsx support

* Rename

* use same defaults as css-loader. Fix linting

* Add NoEmitErrorsPlugin

* Add clientBootstrap

* Use webpackhotmiddleware on the multi compiler

* alpha.3

* Use babel 16.2.x

* Fix reloading after error

* Remove comment

* Release 5.0.0-univeral-alpha.1

* Remove check for React 16

* Release 5.0.0-universal-alpha.2

* React hot loader v4

* Use our static file rendering machanism to serve pages.
This should work well since the file path for a page is predictable.

* Release 5.0.0-universal-alpha.3

* Remove optional loaders

* Release 5.0.0-universal-alpha.4

* Remove clientBootstrap

* Remove renderScript

* Make sure pages bundles are served correctly

* Remove unused import

* Revert to using the same code as canary

* Fix hot loader

* Release 5.0.0-universal-alpha.5

* Check if externals dir exist before applying config

* Add typescript support

* Add support for transpiling certain packages in node_modules

Thanks to @giuseppeg’s work in https://github.com/zeit/next.js/pull/3319

* Add BABEL_DISABLE_CACHE support

* Make sourcemaps in production opt-in

* Revert "Add support for transpiling certain packages in node_modules"

This reverts commit d4b1d9babfb4b9ed4f4b12d56d52dee233e862da.

In favor of a better api around this.

* Support typescript through next.config.js

* Remove comments

* Bring back commons.js calculation

* Remove unused dependencies

* Move base.config.js to webpack.js

* Make sure to only invalidate webpackDevMiddleware one after other.

* Allow babel-loder caching by default.

* Add comment about preact support

* Bring back buildir replace

* Remove obsolete plugin

* Remove build replace, speed up build

* Resolve page entries like pages/day/index.js to pages/day.js

* Add componentDidCatch back

* Compile to bundles

* Use config.distDir everywhere

* Make sure the file is an array

* Remove console.log

* Apply optimization to uglifyjs

* Add comment pointing to source

* Create entries the same way in dev and production

* Remove unused and broken pagesGlobPattern

* day/index.js is automatically turned into day.js at build time

* Remove poweredByHeader option

* Load pages with the correct path.

* Release 5.0.0-universal-alpha.6

* Make sure react-dom/server can be overwritten by module-alias

* Only add react-hot-loader babel plugin in dev

* Release 5.0.0-universal-alpha.7

* Revert tests

* Release 5.0.0-universal-alpha.10

* Make sure next/head is working properly.

* Add wepack alias for 'next' back.

* Make sure overriding className in next/head works

* Alias react too

* Add missing r

* Fragment fallback has to wrap the children

* Use min.js

* Remove css.js

* Remove wallaby.js

* Release 5.0.0-universal-alpha.11

* Resolve relative to workdir instead of next

* Make sure we touch the right file

* Resolve next modules

* Remove dotjsx removal plugins since we use webpack on the server

* Revert "Resolve relative to workdir instead of next"

This reverts commit a13f3e4ab565df9e2c9a3dfc8eb4009c0c2e02ed.

* Externalize any locally loaded module lives outside of app dir.

* Remove server aliases

* Check node_modules reliably

* Add symlink to next for tests

* Make sure dynamic imports work locally.
This is why we need it: b545b519b2/lib/MainTemplate.js (L68)
We need to have the finally clause in the above in __webpack_require__.
webpack output option strictModuleExceptionHandling does that.

* dynmaic -> dynamic

* Remove webpack-node-externals

* Make sure dynamic imports support SSR.

* Remove css support in favor of next-css

* Make sure we load path from `/` since it’s included in the path matching

* Catch when ensurepage couldn’t be fulfilled for `.js.map`

* Register require cache flusher for both client and server

* Add comment explaining this is to facilitate hot reloading

* Only load module when needed

* Remove unused modules

* Release 5.0.0-universal-alpha.12

* Only log the `found babel` message once

* Make sure ondemand entries working correctly.
Now we are just using a single instance of OnDemandEntryHandler.

* Better sourcemaps

* Release 5.0.0-universal-alpha.13

* Lock uglify version to 1.1.6

* Release 5.0.0-universal-alpha.14

* Fix a typo.

* Introduce multi-zones support for mircofrontends

* Add section on css
2018-01-30 16:44:44 +01:00
Saro Vindigni
202ceca1af Fix Doc in with-firebase-authentication (#3626) 2018-01-27 15:12:25 +01:00
Gavin
8c366defaf fix(store): product env cannot find module 'redux-devtools-extension'. (#3618)
Problem description:
- Cannot find module 'redux-devtools-extension'
2018-01-26 17:09:49 +01:00
Shaleen Jain
c40f184a6a Extend with-data-prefetch to handle advanced use cases (#3525) 2018-01-26 17:07:17 +01:00
Tim Neutkens
bba744d3fa Merge branch 'master' into fix/canary 2018-01-13 06:33:19 +01:00
Wei Zhu
9263ad13f7 Update Ant Design example (#3485) 2018-01-06 17:14:22 +01:00
Cory House
b5739d5361 Grammar fixes (#3531) 2018-01-03 14:06:45 +01:00
credifiable
e80d9b4696 Updated material-ui-next URI (#3509) 2017-12-28 16:25:11 +01:00
Jerome Fitzgerald
46b57a6eff [refactor] with-apollo-and-redux: 2.0.0 (#3484)
* [refactor] with-apollo-and-redux: 2.0.0

- This ports over `with-apollo` (w/ recent `withRouter` fix and addition
for Post) along with implementing `apollo-cache-redux` #3463
- The `redux` side of things is lacking (it is the *same* as the
original example)
- Created a `routes.js` for use on Server and Client Side (to expand the
PostList functionality)
- SSR is maintained
- Redid the "PostVote" a bit... sorry. 😬️

Possible todo(s):
- Add in API and Clock Examples from `with-redux` to show Apollo and
Redux working together a bit more
- redux-saga (I personally use this, may be too opinionated for the base
example though)

Packages updated:
- apollo-cache-redux
- apollo-client-preset
- graphql
- graphql-anywhere
- graphql-tag
- isomorphic-unfetch
- next-routes
- prop-types
- react
- react-apollo
- react-dom
- redux

* [refactor] fix linting issues

When I run `yarn lint` explicitly these were caught, but not doing a
build proper. Apologies on that!

* [chore] 📦️ package.json: like other examples

* [refactor] +apollo-cache-inmemory, -apollo-cache-redux

Separation of Apollo and Redux. 😄️
We could stand to use a few actual examples of Redux, though this is a
good starting block.
Some other code cleanup as well.
2017-12-27 19:57:57 +01:00
Sergio Xalambrí
ffdf4e3228 Add with-data-prefetch example (#3420)
* Add with-data-prefetch example

* Fix typos

* Improve example code
2017-12-26 21:46:46 +01:00
Ricardo Pierre-Louis
f2989c5739 Examples/with reflux (#3476)
* Update withData.js (#3458)

#3234

* Begun with-reflux example

* Built with-reflux example

* Built with-reflux example
2017-12-19 10:33:01 +01:00
Brice BERNARD
5bb710a0d2 [with-jest] Upgrade to jest 22 and so remove raf deps (#3477) 2017-12-19 10:29:29 +01:00
Petr Huřťák
9bc681bea1 Fix glamorous example (#3462)
It used old version 1 and when I run npm run dev it returned 500.
Once I updated to 4, everything works as expected.
2017-12-18 11:28:57 +01:00
Abdulhalim Kara
69aa647535 Update withData.js (#3458)
#3234
2017-12-18 11:27:16 +01:00
Brice BERNARD
35ffad968c [with-apollo] Fix missing rootContext (#3468) 2017-12-18 11:25:06 +01:00
Sergio Xalambrí
5040de3b3f Fix SVG component example dependencies (#3448) 2017-12-13 01:44:11 -08:00
Bertrand Marron
c8d2da68cf Use "preset-env" option to configure env preset in with-jest example (#3424) 2017-12-08 20:01:05 -08:00
Thierry Charbonnel
4cab5228a0 Github gh-pages Example (#3383)
* gh-page-exemple

* add babelrc for gh-page exemple

* Fix example (exemple in fr)

* example fix typo

* lint fix
2017-12-08 18:17:04 -08:00
Tim Neutkens
51f120ec70 Add markdown-in-js example (#3410) 2017-12-06 18:20:38 -08:00
Tim Neutkens
24c1ac6ca9
Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
Tim Neutkens
b64365b550 Add markdown-in-js example (#3410) 2017-12-06 16:59:32 -08:00
Thomas Greco
278f58b54b pushing updated emotion example (#3344)
* pushing updated emotion example

* Fix linting
2017-12-05 16:46:06 -08:00
Brice BERNARD
48ed89f93d [with-apollo] Fix warning about missing _allPostsMeta and more (#3397)
* Fix coding style

* Fix className type

* Upgrade deps

* Fix coding style of lib/

* Simplify onSubmit handler

* Fix missing missing _allPostsMeta warning

* Follow lint rules
2017-12-05 10:50:45 -08:00
Brice BERNARD
25005d158b [with-jest] Fix tests (#3395)
* Fix tests

* Follow linting rules
2017-12-05 10:43:30 -08:00
Tibor Vukovic
e8f39ad74c Update hapi example to support hapi@17 (#3357) 2017-12-05 10:42:57 -08:00
Arunoda Susiripala
820e3ff716
Always load pages with ".js" extension (#3393)
* Always fetch pages with '.js' extention from client side.

* Load error page always from _error.js rather _error/index.js

* Load pages from page.js instead of page/index.js from the client for static exports.

* Update index.js

* Simplify the path re-write logic in the webpack pages-plugin.
2017-12-05 04:49:53 +05:30
Giuseppe
5daafa4f87 Upgrade styled-jsx to v2.2.1 (#3358)
* Pulled encoding to top of head (#3214)

* Remove next.d.ts to use @types/next (#3297)

* Add with-mobx-state-tree example (#3179)

* Adapt with-mobx example for with-mobx-state-tree

* Remove unnecessary lastUpdate parameter to show off snapshot

* update readme

* make other.js more closely mimic index.js

* Upgrade styled-jsx to v2.2.1

Includes some bug fixes.

* Fix linting
2017-12-04 08:15:30 -08:00
dsantic
3a651971e1 Upgrading with-flow example to the latest flow-bin ver. 0.59.0 (#3337)
For upgrading I used flow-upgrade module by https://yarnpkg.com/en/package/flow-upgrade
2017-12-03 14:58:46 -08:00
Fouad Matin
2528779394 examples: add create-next-app (#3377)
* examples: add create-next-app

* fix with-typescript readme
2017-12-02 20:30:17 -08:00
Gregoor
6ad54704da Update relay example dependencies & .gitignore (#3365) 2017-12-02 18:07:42 -08:00
Sergio Xalambrí
cd0e13df01 Add example of Nodemon on a custom server (#3374) 2017-12-02 15:44:38 -08:00
Tim Neutkens
df4974eac8
Add runtime environment example (#3371) 2017-12-02 18:08:53 +01:00
Sergio Xalambrí
32eb6b7718 Add with Portals example (#3372) 2017-12-02 18:02:22 +01:00
Adrian Li
f9c6e12037 Update reason example to version 3 syntax and fix errors (#3347)
* update dependencies

* add bsconfig refmt version

* update to new syntax

* add dependency on concurrently for dev convenience

* fix dev script
2017-11-28 14:15:03 +01:00
Tim Neutkens
c9401214db Fix linting 2017-11-25 12:03:25 +01:00
Brian Dombrowski
5ede8c9dc3 More complete with-apollo-and-redux example with dynamic post route (#3223)
* More complete with-apollo-and-redux example with dynamic post route

* Removed commented out code
2017-11-23 14:05:51 +01:00
Lucas Rosa
fc335ac36c Add example with tailwind css (#3317)
* Add Tailwind css example

* Fix read me

* Add create-next-app setup to read me
2017-11-23 13:48:34 +01:00
Max Scher
f0eacf66ea Add data node to serverState declaration (#3321)
The serverState variable definition did not include the data node, which
may cause parsing errors on the client-side.
  - add data: { } on line 23 within the apollo: { } object
2017-11-23 13:46:33 +01:00
Dan Argue
a8c344fa19 Add with-mobx-state-tree example (#3179)
* Adapt with-mobx example for with-mobx-state-tree

* Remove unnecessary lastUpdate parameter to show off snapshot

* update readme

* make other.js more closely mimic index.js
2017-11-23 13:41:59 +01:00
Tage A. L. K
c6d9ab7563 with-apollo-auth updated for Apollo 2.0 (#3278)
* Updated for Apollo 2.0

* Updated for commit: ccb188a

* Simplified serverState

Updated with danistefanovic's comment. Looks better.

* Revert "Simplified serverState"

This reverts commit 1b543a35909dcfe401c753cb2f71760180087057.

* Simplified server

Updated with Statedanistefanovic's comment.
2017-11-17 08:23:52 +01:00
Brice BERNARD
bda073cfc1 Remove next.d.ts to use @types/next (#3297) 2017-11-16 12:28:10 +01:00
Thomas Vogel
abe0aebcc0 updated with-apollo example to update option API (#3296) 2017-11-16 11:18:25 +01:00
Tim Neutkens
6977d61ebe Merge branch 'master' into canary
# Conflicts:
#	.travis.yml
2017-11-15 13:20:46 +01:00
Divyendu Singh
ccb188ab6b Update withData.js - support withRouter HOC (#3286)
Add support for using withRouter as HOC with this example.

Passing router context manually fixes this, based on, https://github.com/zeit/next.js/issues/2908#issuecomment-338244804
2017-11-15 10:44:06 +01:00
Elliot Hesp
636c428a05 Update deprecated firebase method (#3277)
getToken is now deprecated, you'll get the following message if using the previous code:

firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.
2017-11-15 10:35:30 +01:00
Nghiệp
c0581a40cc Update README.md for with-shallow-routing example (#3285) 2017-11-15 09:55:41 +01:00
Tomek
5260736e33 example with-redux-observable (#3272)
* example with-redux-observable

* fix styling with js standard-style
2017-11-13 20:37:43 +01:00
Brice BERNARD
45e26f22b3 Fix tsx workaround, bootstrap next.d.ts, add tslint deps (#2885) 2017-11-13 13:59:00 +01:00
Vinicius Camargo
fbd4f03254 Update the custom-server-express with an req.params example (#3258) 2017-11-13 12:22:10 +01:00
yuyaohshimo
e67d17ef84 Add kea example (#3262) 2017-11-13 12:21:11 +01:00
Kai Yen
d72d3c09ef Fixed how credentials opt is passed to HttpLink (#3269)
Prior to react-apollo 2.0 createNetworkInterface accepted the credentials option in {opt: {credentials: 'policy'}}. HttpLink accepts it as {credentials: 'policy'}.
2017-11-13 12:20:59 +01:00
Tomas Roos
629d0a261b messages are availble within initialProps (#3252)
This has never been working, we based our intl + locale lookups out of this example and found out when translations wasn't working on page transitions due to the fact that messages gets set to undefined because its trying to destruct in the incorrect level
2017-11-08 20:37:52 +01:00
cinos
983455ed51 Update package.json (#3246)
Upgrade i18next & react-i18next
2017-11-06 08:51:16 +01:00
Tim Neutkens
6952d58c4e Make sure examples adhere to code style 2017-11-05 19:47:12 +01:00
Juan Gallo
e1d9ae27f0 only-client-render-external-dependencies example (#3229) 2017-11-05 17:20:24 +01:00
Tim Neutkens
18f8ab392a Merge branch 'master' into canary
# Conflicts:
#	examples/with-apollo/lib/initApollo.js
#	examples/with-apollo/package.json
#	examples/with-react-with-styles/package.json
#	examples/with-static-export/package.json
#	package.json
2017-11-05 11:01:59 +01:00
Leandro Ardissone
a35e747e24 Added Sentry.io example (#3215)
* Added Sentry example

* Code style fixes

* Fixes docs + removed demo DSN + send error to comp
2017-11-04 15:06:16 +01:00
Leonardo Quixada
b41d177609 Dropped isomorphic-fetch in examples in favor of isomorphic-unfetch. (#3230) 2017-11-04 15:05:16 +01:00
Andy Kenward
8bb31f0960 fix : example/with-noscript to use next@latest and react-dom (#3237)
* example with-noscript use next@latest

* fix : example/with-noscript react-dom/server usage

Since the update to react ^16.0.0 react-dom import location has changed
2017-11-04 11:25:39 +01:00
Andy Kenward
c29ec6bdd0 example/with-static-export update react & next dependencies (#3238)
`next@latest` instead of beta
react 16
2017-11-04 11:24:54 +01:00
Jerome Fitzgerald
a450502a0d [fix] with-apollo: Cannot read property 'data' (#3226)
* [fix] with-apollo: Cannot read property 'data'

When we create the initial serverState, we need to create the
 eventual construct of the Apollo Data to reside within

Later in the constructor this allows for the initApollo to either
 be generated from SSR, or to init from scratch.

Fixes
> Cannot read property 'data' of undefined
> TypeError: Cannot read property 'data' of undefined

* [refactor] with-apollo: reduce init `serverState`

No need to explicitly set `data` as empty.
This trims up 4 lines. 😀
2017-11-04 11:24:16 +01:00
Kitti Piyapan
28767c06d1 Change file name lib on example keep the same format (#3227)
Change file name format on folder lib like /examples/with-apollo and /examples/with-apollo-and-redux
2017-11-02 17:56:14 +01:00
Thomas Kolar
6089377c6b Fix/Update react-with-styles & aphrodite example (#3224)
* chore(package): Update dependencies for aphrodite and react-with-styles

* refactor: Update example to current version of react-with-styles
2017-11-01 19:53:45 +01:00
Tim Neutkens
c8059b9f12 Make sure linting passes 2017-10-31 08:58:00 +01:00
Remy Sharp
4c18678d54 Create example of activeClassLink using withRouter (#3188) 2017-10-30 15:24:31 +01:00
Ismael Martínez
015d06a331 Upgrade React for examples with next@latest (#3196) 2017-10-29 00:58:17 +02:00
Sebastian
741f211331 with-apollo example using Apollo 2 (#3180)
* Updated dependencies related to Apollo and React.

* Updated libs with Apollo 2 new set of modules.

* Updated to Apollo 2 react integration modules.

* Updated withData to separate apollo state from the app's state.
2017-10-29 00:58:17 +02:00
Wes Bos
4314802422 Update styled components for React 16 (#3187)
Next 4 only works with React 16, so for this example to work we need an update.
2017-10-29 00:58:17 +02:00
Ismael Martínez
78aa068a12 Upgrade React for examples with next@latest (#3196) 2017-10-28 09:26:00 +02:00
Sebastian
c0eca35810 with-apollo example using Apollo 2 (#3180)
* Updated dependencies related to Apollo and React.

* Updated libs with Apollo 2 new set of modules.

* Updated to Apollo 2 react integration modules.

* Updated withData to separate apollo state from the app's state.
2017-10-28 09:19:56 +02:00
Wes Bos
2d3192e4b8 Update styled components for React 16 (#3187)
Next 4 only works with React 16, so for this example to work we need an update.
2017-10-26 21:29:53 +02:00
Shu Uesugi
9320d9f006 Add with-global-stylesheet-simple (#3157)
* Add with-global-stylesheet-simple

* Lint fix
2017-10-23 20:25:16 +02:00
Ismael Martínez
8c60a2e35d Fix with-amp example (#3153)
React v16 supports invalid DOM attributes now. 
ReactInjection and DOMProperty throws an error.
Reference: #3152
2017-10-23 14:37:45 +02:00
Ismael Martínez
e5c46c2632 Update React on with-socket.io example (#3151)
Next.js v4 requires React v16.
2017-10-23 11:23:50 +02:00
Jerome Fitzgerald
89691cbe0c [chore] Examples: styled-jsx-plugin-sass@0.2.0, show dynamic (#3137)
* [chore] styled-jsx-plugin-sass@0.2.0, show dynamic

styled-jsx-plugin-sass had an update that now allows for sass and
 dynamic to live together.

This updates that package and updates the example slightly to show how.

* [fix] errant space in styled-jsx-scss example
2017-10-20 19:29:02 +02:00
Li Weinan
9b53d007e7 [update example - with-apollo-and-redux] pin dependencies (#3130)
* update dependnecies

* keep next version as `latest` and depend on `react@^16.0.0`
2017-10-19 14:42:24 +02:00
Mariano Fernández Cocirio
474085b68a Jest example updated (#3123)
* jest example updated

* reverted changes on yarn.lock
2017-10-17 20:59:22 +02:00
Tim Neutkens
47d3cfd0fd Upgrade React for all examples (#3113) 2017-10-17 08:11:46 +02:00
Stephen Daves
b7406e90c5 Fix url typo (#3111) 2017-10-16 21:28:25 +02:00
Tim Neutkens
ae44109f6d Add styled-jsx-plugin-sass example (#3104)
* Upgrade dependency on next

* Add styled-jsx-plugin-sass example

* Update readme
2017-10-16 12:08:24 +05:30
Connor Bär
9b129f883d Fix 'Deploy to now' link for with-styled-jsx-plugins example (#3103) 2017-10-16 08:16:09 +02:00
Tim Neutkens
e9d14613d4 Make styled-jsx configurable (#3050)
* Make styled-jsx configurable

* Add styled-jsx-plugin-postcss example

* Add styled-jsx 2.1.0 with plugins support

* Move examples around and add description

* Add link to new example
2017-10-15 19:54:57 +02:00
Mariano Fernández Cocirio
2f6e43f57f Update styled-jsx-postcss example (#3083)
* Update babel-preset.js

As './dist/server/build/babel/preset' now return a function, in this example we need to first call the function and after that replace styled-jsx

* linting issues solved
2017-10-13 23:28:42 +02:00
Sitian Liu
a25cb412bf Firebase server side auth example update: don't fetch messages server-side if user is not found (#3087)
* don't fetch messages server-side if user is not found 

Currently, the component always fetch everything under '/messages' even if the user is not authenticated on the server side. Update it to not fetch if the user is not found as a better example on handling.

* fix lint error
2017-10-13 23:08:41 +02:00
Kohei Hasegawa
63ac27b900 Update TypeScript example (#3074) 2017-10-11 21:36:04 +02:00
Eric Redon
96f5bcbd57 Uplift with-global-stylesheet example (#3076)
* Fix with-global-stylesheet example by depending on React≥16

* Bump other dependencies of with-global-stylesheet example
2017-10-11 21:32:45 +02:00
Hugo Meissner
573692c137 emotion v8 + adjustments for breaking changes (#3054)
* emotion v8 + adjustments for breaking changes

* Corrected versioning

* Take hydrate from 'react-emotion'

I was actually wondering that, but haven't seen hydrate in the medium post (even though you pointed out that react-emotion exports all of emotion and I've seen it in source) and didn't want to risk it for the off chance that it *should* be imported directly from emotion for some reason :D
2017-10-09 23:18:37 +02:00
Simon Hänisch
7fe20ed285 update readme for using-preact example (#3062)
There was a missing "is" in one of the sentences.
2017-10-09 22:55:56 +02:00
Guilherme Diego
ebfa08fdff Add details to with-scoped-external-css (#3055) 2017-10-08 16:55:17 +02:00
Tom MacWright
559c25253e Configurable opts for babel-preset-env + babel-plugin-transform-runtime (#2991)
* Configurable opts for babel-preset-env + babel-plugin-transform-runtime

This adds `preset-env` and `transform-runtime` options to the
`next/babel` Babel preset, which are then passed through to those
presets and transforms. This allows configuration to keep next.js
from the default 'maximum' transform, and instead use built-in
implementations of globals, classes, async, and other commonly-supported
features.

Fixes #2989

* Use spread notation instead of Object.assign
2017-10-07 08:38:59 +02:00
James Hegedus
594b214a23 Update with-firebase-hosting. (#3032)
Simplify scripts.
2017-10-05 08:28:46 +02:00
Ryan Ponce
97a6a62a6b Fix typo in README (#3038) 2017-10-03 22:13:07 +02:00
Theodore Vorillas
de8ecbbe19 Added Fastify example (#3034) 2017-10-03 07:58:26 +02:00
Alain
df5b96adec typo on line 7 (#3031)
bsb make world instead of nake world.
2017-10-02 16:12:52 +02:00
Nicholas Rakoto
016920e3e0 Example: Improve ReasonML example (#3021)
* Git ignore with-reasonml/lib folder

The lib folder contains code generated by BuckleScript, it shouldn't be
versioned.

* Fix, case sensitive paths

Next.js use case-sensitive-paths-webpack-plugin and BuckleScript tries
to maintain the filename case.

* Refactor, use a .babelrc file instead of a babel config in package.json

This is the official recommended way in Next.js

* Enable way, way, waaaay nicer error messages!

Adds `"bsc-flags": ["-bs-super-errors"]` to the bsconfig.json file.

https://reasonml.github.io/community/blog/#way-way-waaaay-nicer-error-messages

* Fix npm scripts & use concurrently to run bsb & next in parallel for dev

* Upgrade bs-platform

* Replace statefulComponent with new reducerComponent

https://github.com/reasonml/reason-react/blob/master/HISTORY.md#024

* Upgrade with-reasonml example to next.js 3
2017-09-30 22:02:45 +02:00
Tim Lucas
bf1927436c Update the hash-statics example to support sub-dirs (#3015) 2017-09-30 09:00:23 +02:00
Jimmy Moon
846f734da3 Add webpack-bundle-size-analyzer example (#3013) 2017-09-28 22:03:59 +02:00
José Netto
362fcf917a Update with-dotenv example README.md to add troubleshooting information (#2995) 2017-09-26 23:06:29 +02:00
Christian Alfoni
094bb1f7b9 Add Cerebral example (#2976) 2017-09-23 16:30:22 +02:00
estrada9166
4bd30c8713 Example: Form handler with Redux and React-bootstrap (#2949)
* Example: Form handler with Redux and React-bootstrap

* inputChange refactoring

* Destructuring inputChange
2017-09-19 21:24:28 +02:00
Srigi
d03ce5386d Example: with Freactal (#2955)
* Define dependencies & NPM stuff for the example

* Setup Babel preset

* Add sources of working version of example

* Indicate ajax loading state

* Add readme file

* Remove unneeded .babelrc
2017-09-17 23:16:19 +02:00
Shaleen Jain
093b091a5c Update styled components example (#2945)
* Update styled components example

Updates the styled-components example to pass HOC to renderPage() and fix SSR.

* fix lint errors
2017-09-14 14:17:18 +02:00
Márcio Vinícius Oliveira Sena
87d7ad2fc0 Example: Overwriting meta tag with react-helmet (#2942) 2017-09-12 14:55:40 +02:00
David Nguyen
3e8d2b37bb added with-noscript example (#2767) 2017-09-08 23:33:15 +02:00
Sergio Xalambrí
8b507a7943 Example: Add asset imports example (#2864) 2017-09-08 23:21:06 +02:00
Andrey Marchenko
b66490835c Corrected dependencies for preact and inferno (#2583)
* Corrected dependencies for the preact example. Require react and react-dom

* Corrected dependencies for the inferno example. Require react and react-dom
2017-09-08 23:15:03 +02:00
starriv
ace748dcfe More elegant application of antd (#2840)
* Update .babelrc

* Create index.js

* Update index.js

* Update index.js

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Fix linting errors
2017-09-08 23:13:52 +02:00
Tim Neutkens
6e88780419 Add missing variables (#2905) 2017-09-05 21:43:31 +02:00
Kent C. Dodds
32c3dd0476 docs(jest): add note about .babelrc (#2911)
Closes #2895
2017-09-05 18:27:17 +02:00
Sergio Xalambrí
e13bb3f62f Example: hashed statics (#2891)
* Add hashed statics example

* Fix linting
2017-09-02 00:35:45 +02:00
Brikou CARRE
32d9b75d55 Use https to prevent mixed content when served over https (#2741) 2017-09-01 11:54:03 +05:30
Arunoda Susiripala
8f874f050c [WIP] Use buildId in chunk urls as well (#2873)
Use buildId in chunk urls as well
2017-08-31 05:47:06 +05:30
Sergio Xalambrí
fd198d28a8 Example: with absolute imports (#2863)
* Add with-absolute-imports example

* Fix examples repo urls to point to master instead of v3-beta
2017-08-30 20:03:36 +02:00
Matteo Mazzarolo
a142848ef5 Added side note about enabling gzip on Koa (#2867)
I'll share this small snippet here, it might be useful.
2017-08-30 17:45:28 +02:00
Arunoda Susiripala
56662b4d84 Add/with router (#2870)
* Add withRoute HOC

Rebased (squashed)
- removed routerToProps
- updated hoist-non-react-statics
- improved propTypes

* Expose the whole Router instead of the route.

* Make the example simple.

* Update examples and the readme.

* Add a test case.
2017-08-30 19:37:12 +05:30
Tim Neutkens
eba9ebef5f Merge v3-beta into master (#2809)
* Add examples/with-redux-code-splitting. (#2721)

* #1757 Relay Modern Example (#2696)

* Add ReasonML example (#2640)

* Add ReasonML example

* Add a gitignore specifically for the reasonml example

* Allow custom className for <Main /> (#2802)

* 3.0.2

* Remove beta information from the README.

* 3.0.3

* Remove unnecessary lookup in example with emotion (#2731)

* Document SCSS/Less (#2742)

* Document SCSS/Less

* Add missing word

* Add docs for examples dir

* Add extra example

* uppercase J

* Add with pkg example (#2751)

* Add custom server micro example (#2750)

* Ease running multiple examples at the same time with process.env.PORT (#2753)

* Add line-height rule for error page h2 (#2761)

* Add support for fetching multiple translation files (#2743)

* Add support for fetching multiple translation files

* Cleanup

* Clear missed interval (#2611)

* clear missed interval

* remove trailing whitespace

* Relay Modern Example (#1757) (#2773)

* Simplification of Relay Modern Example (#1757) (#2776)

* Use deterministic names for dynamic import (#2788)

* Always use the same name for the same dynamic import.

* Add unit tests for the modulePath generation.

* Allow tests to run correctly on Windows.

* Make the chunk name a bit pretty.

* Fix tests to run on Windows.

* 3.0.4

* Revert "Make the chunk name a bit pretty." (#2792)

This reverts commit 0c9e8cf2271955e74ab9f752b5869b98c1dc60f9.

* 3.0.5

* Use _ as the divider for dynamic import name splitter. (#2793)

Using - gives us some weird webpack errors.

* 3.0.6

* next/dynamic Error Message Tweaks (#2798)

* Fixed issue (#2804)

https://github.com/zeit/next.js/issues/2800

* docs(material-ui): move the source code to Material-UI repository (#2808)
2017-08-27 22:13:35 +02:00
Julian Wilson
b543795fc0 Clarify usage of connect in README.md (#2845)
Added a quick example of how to use `connect` in `react-redux` as there are no examples in this example.
2017-08-27 20:56:52 +02:00
Matija Marohnić
3c92524b06 Update example with emotion (#2837)
* Update example with emotion

Emotion is now split into separate packages using Lerna.

* Update Next.js in emotion example
2017-08-24 08:27:49 +02:00
Brikou CARRE
c689bc9f8b Simplify condition in mobx example (#2812) 2017-08-19 18:02:40 +02:00
Leo Lamprecht
18e447afc5 Linked post about Next.js + Electron 2017-08-19 16:37:09 +02:00
Olivier Tassinari
232ba01f84 docs(material-ui): move the source code to Material-UI repository (#2808) 2017-08-18 22:42:45 +02:00
Penn Su
ccc9ff2201 Fixed issue (#2804)
https://github.com/zeit/next.js/issues/2800
2017-08-18 18:46:30 +02:00
Petr Vlček
ed0c144af9 Simplification of Relay Modern Example (#1757) (#2776) 2017-08-15 07:50:56 +02:00
Petr Vlček
708193d227 Relay Modern Example (#1757) (#2773) 2017-08-14 18:41:12 +02:00
Denis Lukov
726499ff14 Clear missed interval (#2611)
* clear missed interval

* remove trailing whitespace
2017-08-13 15:44:14 +02:00
whphhg
8acdae66d7 Add support for fetching multiple translation files (#2743)
* Add support for fetching multiple translation files

* Cleanup
2017-08-13 02:28:20 +02:00
Brikou CARRE
ba65b07dff Ease running multiple examples at the same time with process.env.PORT (#2753) 2017-08-10 20:15:46 +02:00
Sergio Xalambrí
d0b95d9bda Add custom server micro example (#2750) 2017-08-10 08:07:00 +02:00
Sergio Xalambrí
cc5289a89f Add with pkg example (#2751) 2017-08-10 08:06:14 +02:00
Matija Marohnić
029bac4fd9 Remove unnecessary lookup in example with emotion (#2731) 2017-08-09 17:26:45 +02:00
Arunoda Susiripala
4fc545245a Merge with master. 2017-08-09 12:04:14 +05:30
Sergio Xalambrí
4b0467ed42 Add Electron example (#1430)
* Add Electron usage example

* Remove the deploy part

* Only allow GET request to our HTTP server

* Only allow request from an electron app (checking the user agent)

* Add warning about the local HTTP server

* Update package.json

* Update example to use Next.js v3

* Added required package.json fields with placeholders

* Use next:// file protocol to open internal built files

* Create next.config.js

* Update set-menu.js

* Update example to merge it with electron-next-skeleton ideas
2017-08-09 07:56:23 +02:00
Sergio Xalambrí
fe4e53e5db With recompose (#2712) 2017-08-07 19:37:44 +02:00
Dmytro V. Dogadailo
256f9dc765 Add missed dev dependencies for examples/using-preact (#2714) 2017-08-06 19:22:01 +02:00
Alvin
65ff72aada renames misspelt placeholder.html (#2703) 2017-08-03 08:04:03 +02:00
SangWon Kim
37362c3e98 Fix typo (#2692) 2017-08-01 07:29:52 +05:30
Boris Berman
f0779e95d6 Grammar fix (#2686)
pseedo -> pseudo
2017-07-31 17:36:28 +05:30
Claus Klingberg
4f0592a584 Material-UI example: Pass through unrelated props to wrapped component (#2664) 2017-07-30 22:22:38 +02:00
James Hegedus
b27526b6ff with-firebase-hosting update (#2683)
* Fix link in with-firebase-hosting example

* with-firebase-hosting example

Update npm scripts & README
2017-07-30 14:02:16 +02:00
Tran Dac Anh
c87b471b22 Example to add custom reverse proxy like in webpack-dev-server (#2660)
* add with-custom-reverse-proxy example

* cleanup

* cleanup package.json

* fix linting errors

* more linting errors
2017-07-29 14:45:12 +02:00
Renan Couto
93e15a23b9 Remove stage-0 from dependencies on example (#2656)
This PR removes `babel-preset-stage-0` from the dependencies list, that was missing on #1959.
2017-07-27 13:47:49 +05:30
Tim Neutkens
cf130c70f0 Prefix process.env to avoid inconsistency (#2647) 2017-07-26 20:39:21 +02:00
James Hegedus
84de7f9397 With Firebase Hosting Example (#2642)
* Rename Firebase Auth example

* Update gitignore to include npm5 lockfile

* Cloud Function

* Add Next app with two pages to demonstrate navigation

* Add Firebase Hosting and configuration to Host & Deploy

* Fix errors in rename for firebase-auth example

* Recommend pkg managers with caches for better perf

* Update with-firebase-hosting example

Fix code

* Update with-firebase-hosting example

Fix npm scripts and package.json files

* Update with-firebase-hosting example

Update README & install scripts

* Update with-firebase-hosting example

Update example package name

* Update with-firebase-hosting example

Fix to use single-quotes

* Update with-firebase-hosting example

VSCode did not like single-quotes! Sorry

* Fix gitignore file
2017-07-26 07:52:49 +02:00
Olivier Tassinari
58c2d138d0 examples(material-ui): change the wrapping strategy (#2648)
By creating an intermediary component (with the HOC)
we save some React rendering logic.
That's also addressing an issue with JssProvider (react-jss)
that generate a new index at each render.
2017-07-25 22:42:23 +02:00
Olivier Tassinari
c84bf2ea32 Update material-ui example (#2630) 2017-07-24 06:39:36 +02:00
Talasan Nicholson
337471d684 Add page transitions example (#2613) 2017-07-22 10:00:15 +02:00
Micooz Lee
24a67ee967 examples/with-react-helmet: upgrade react-helmet to v5.1.3 and fix invariant violation caused by bodyAttributes (#2587) 2017-07-18 08:03:21 +02:00
Jan Mühlemann
e7d91bf692 adds with react-i18next example (#2558)
* adds with react-i18next example

* lint example code

* remove unneeded .babelrc
2017-07-16 22:19:45 +02:00
Matt
6ff89b1f52 Update with-emotion to flush SSR styles on refresh (#2565)
* Update with-emotion to flush SSR styles on refresh

* with-emtotion: remove @apply, use composes

* fix env determination
2017-07-15 09:32:14 +02:00
Jun Matsushita
b47395ab2f Fix non valid trailing comma (#2560) 2017-07-15 09:08:08 +05:30
Kent C. Dodds
96182bc180 add babel-macros example (#2563) 2017-07-14 23:22:25 +02:00
Brent Mealhouse
543f2854cb Add with-redux-saga example (#2551) 2017-07-13 20:55:29 +02:00
Nikolay Kolev
b253479a94 Fix the build of with-material-ui-next (#2550) 2017-07-13 13:11:20 +02:00
Marie-Laure Thuret
94c484e80d docs: add algolia-react-instantsearch example (#2544)
* docs: add algolia-react-instantsearch example

* fix: style
2017-07-12 20:00:47 +02:00
Tobias Barth
24c2e9954a Add stringify advice to MobX example readme. (#2541) 2017-07-12 15:24:03 +02:00
Nguyen Hoang Phuc
530b561039 Add example for usage of redux + reselect + recompose (#2523)
* implemented example for using redux with reselect and recompose

* removed unused package

* fixed linting issue

* fixed linting issue
2017-07-11 20:17:00 +02:00
Sagi
ab82f06c87 Added react and react-dom dependencies (#2518)
* Added react and react-dom dependencies

Added missing `react` and `react-dom` dependencies which are required by next.js

* Moved react & react-dom to dependencies

Moved react & react-dom to dependencies from devDependencies
2017-07-09 15:26:35 +02:00
Ashley
5a0c61a78c Update next.config.js (#2511) 2017-07-09 13:52:35 +02:00
myxvisual
a0d85d8bee fix: Update react-uwp example support Next 3 (#2464)
* fix: Update react-uwp example support Next 3

* style: Update linted codes
2017-07-08 14:12:01 +02:00
Sergio Xalambrí
6535b5646b Example Rebass (#2490) 2017-07-08 14:05:46 +02:00
Arunoda Susiripala
6715da98ac Update README.md 2017-07-08 17:14:14 +05:30
Arunoda Susiripala
a1b74a0849 Update README.md 2017-07-08 17:13:57 +05:30
Josh Hawkins
5bd3a5f1d1 Update emotion example to use css instead of fragment (#2497) 2017-07-07 17:25:26 +02:00
Wei Zhu
df1cd7ebf3 Fix "Deploy to now" link (#2489) 2017-07-07 11:23:25 +05:30
Arunoda Susiripala
c5c270c576 Merge master into v3-beta. 2017-07-06 12:24:31 +05:30
Matt Hamlin
0f3fecfe8b Update emotion examples with new API for SSR and React endpoint (#2456)
* Update emotion examples with new API for SSR and React endpoint

* Actually fixing tab replacement
2017-07-06 07:44:46 +02:00
Tim Neutkens
7f2acd592b Fix download link (#2463) 2017-07-05 10:48:33 +05:30
Watcharakrit Phantu
56f52db5a9 Fixed example with-scoped-stylesheets-and-postcss: css-modules reload update from files [name].css.json. (#2110)
* Fixed: css-modules reload files styles.css.json.

* update: disable uglify for next build.

add: require('fs') for next build.
add: disable uglify on next.config.js for next build.

* Fix linting errors
2017-07-02 00:36:36 +02:00
Jayden Seric
ec2b76f83b Better data fetching error handling for Apollo examples (#2227)
* Display data fetching errors in Apollo examples.

* Prevent Apollo GraphQL errors from crashing SSR.

Also tidied a few comments in the vicinity.
2017-07-01 23:56:12 +02:00
Jayden Seric
9bbdfeca63 Component display name fixes for Apollo examples (#2211)
* Fix decorated component display name issues for Apollo examples.

* Fix linting errors and implement #2286
2017-07-01 23:51:20 +02:00
Sergio Xalambrí
2b9944bf52 Add with-static-export example (#2234) 2017-07-01 21:44:58 +02:00
Colder Xihk
75de0fa5fa update with-antd-mobile example (#2425)
support windows path

remove unused hammerjs hack

remove unused 'style/css' resolver
2017-07-01 21:36:57 +02:00
Tim Neutkens
1ecba3b84d Use right next.js version for with-dynamic-import (#2423) 2017-07-01 08:13:25 +02:00
Miguel Cast
1bddb118bc Example/add react-with-styles example (#2417)
* Example/add react-with-styles example

* fix standars next
2017-06-30 22:32:33 +02:00
Jess Telford
4a0278b5c0 Apollo + Authentication + graph.cool example (#2161)
* Apollo + Authentication + graph.cool example

* Fix linting errors
2017-06-30 22:18:11 +02:00
Colder Xihk
b86bbb65a6 update with-antd-mobile example (#2403)
add support custom svg

remove expire tricks
2017-06-29 22:04:16 +02:00
Penn Su
c9bc471d3a with-dotenv example (#2399) 2017-06-29 08:32:45 +02:00
Mitchell Hamilton
31db8dd932 Add with-emotion example (#2395)
* Add with-emotion example

* Fix linting errors
2017-06-29 07:44:48 +02:00
Arunoda Susiripala
655018c0e7 Merge master into v3-beta 2017-06-29 00:51:05 +05:30
Arunoda Susiripala
23c2f02f56 Make it easy and meaningful to analyze the bundle. (#2393) 2017-06-29 00:46:21 +05:30
Daniel Steigerwald
c39e555353 Improve Fela example (#2330)
* Improve Fela example

- add webPreset
- cleaner code
- add key for style
- demonstrate Fela composition

* Fix standard lint
2017-06-28 19:14:18 +02:00
Thomas Preusse
3be175b466 Apollo Example: Fix duplicate head tags (#2362) 2017-06-28 19:07:21 +02:00
myxvisual
9da6524d30 Feature add react uwp example (#2375)
* feat: Add react-uwp examples

* fix: remove log from ThemeWrapper

* feat: Add README.md

* fix: Fixed right version

* fix: Use JavaScript Standard Style

* fix: Fixed wrong next version
2017-06-27 21:10:26 +02:00
Christoph Stock
5d039877a6 update dependencies (#2354) 2017-06-23 20:40:42 +02:00
Henrik
b2bda416b6 Fix material-ui-next example (#2348) 2017-06-23 15:51:25 +02:00
Henrik
f14297dc80 Normalize example package.json files (#2350) 2017-06-23 10:46:44 +02:00
David Nguyen
3c71e818bf Example/add high order component example (#2331)
* temporary commit

* update code

* completed example higher order component

* remove custom server
2017-06-21 19:45:06 +02:00
Robin Frischmann
d8bc386282 improve server-side rendering (#2322) 2017-06-20 17:21:17 +02:00
Arunoda Susiripala
319a2144f3 Merge master into v3-beta. 2017-06-16 21:55:46 +05:30
Arunoda Susiripala
9df59c1176 Dynamic component support with multiple modules (#2235)
* Layout ground works for next/async

* Implement the Dynamic Bundle feature.

* Add some test cases.

* Update README.

* Implement props aware dynamic bundle API.

* Update tests and README.

* Add a test case for React Context support.
2017-06-16 18:49:34 +05:30
Felipe
db1ee2e161 Add Intl API polyfill in with-react-intl example (#2283)
* Add Intl API polyfill in with-react-intl example

* fix linting
2017-06-16 12:30:35 +02:00
tashburn
6303d19a3a Edited README.md (#2276)
Explained how this example is different from /examples/with-material-ui
2017-06-15 21:51:19 +02:00
David Nguyen
7b62ef3ba6 Upgrade beta version of next for "with-dynamic-import" example (#2262)
* temporary commit

* fixed eslint & parse error when precommit

* upgrade new beta version for stability
2017-06-15 00:16:45 +05:30
Robin Frischmann
c72435fe5c update with-fela to Fela > 5.0 (#2253)
* update fela example

* fix wrong whitespace
2017-06-13 22:50:42 +02:00
Thomas Foricher
480f3ab124 Small typo (#2243) 2017-06-13 12:27:07 +05:30
Arunoda Susiripala
a36be58124 Rewrite urls with hashes correct for static export. (#2242)
* Rewrite urls with hashes correct for static export.

* Fix some lint issues inside an example app.
2017-06-13 11:44:31 +05:30
Chris Wheatley
87c4e98fa5 Add a sw-precache example (#2237)
* add sw-precache example

* remove npm run dev command
2017-06-12 19:24:57 +02:00
Vinay Puppal
7b62184c0b Add with-react-ga example (#2225)
* add with-react-ga example

* fix title in Readme
2017-06-09 23:44:26 +02:00
Adam Soffer
5d71434121 Remove warning when upvoting a post in apollo examples (#2190)
* Fix apollo warning and error when upvoting post

* Fix apollo warning and error when upvoting post in apollo-redux example as well
2017-06-08 19:26:40 +02:00
Adrian le Bas
c66cafd362 Remove hardcoded address from ws example. (#2204)
With a hard coded address on the client, the app no longer works when deploying, which is annoying since there's a handy 'deploy now' button on the readme.

By removing the hard coded address socket.io will connect to the location host automatically so it works both on development and production.
2017-06-08 19:11:08 +02:00
Guillermo Rauch
f4345e79c2 Merge branch 'v3-beta' of github.com:zeit/next.js into v3-beta 2017-06-01 18:31:14 -07:00
Guillermo Rauch
850a931e88 Merge branch 'master' into v3-beta 2017-06-01 18:30:57 -07:00
Ademola Adegbuyi
18bb8774c7 Fix with-glamorous example (#2117)
* Fixed all unsupported style properties
2017-05-31 07:56:50 +02:00
Olivier Tassinari
3a0fe4349c Fix escape issue (#2115)
For instance:
```css
.MuiGrid-gutter-xs-8-1393152966 &gt; .MuiGrid-typeItem-3088349198 {
  font-family: &quot;Roboto&quot;, &quot;Helvetica&quot;, &quot;Arial&quot;, sans-serif;
}
```
2017-05-30 20:51:52 +02:00
Bruno
9f994631f8 Small code fix (#2099)
Using actionType instead of plain string
2017-05-29 19:36:57 +02:00
偏右
9ce12a03c5 Upgrade deps and fix old usage (#2084)
Fix https://github.com/zeit/next.js/pull/1817#issuecomment-299738931
2017-05-27 18:02:53 +02:00
Colder Xihk
56cf8ad0a3 Add ant design mobile example (#1793)
* add antd-mobile example

* update antd-mobile@1.1.2

remove unsupported page

add menu to trick page
2017-05-27 14:22:13 +02:00
偏右
bd96b69049 Add ant design example (#1817)
* Add ant design example

* Reduce bundle size by importing modularized antd

* lock react version for warning
2017-05-27 14:21:01 +02:00
Victor Nahuel Chaves
5187fcdb80 add postcss after sass compilation to with-external-scoped-css example (#1640)
* add postcss after sass compilation

* Fix indent

* Fixed mixed tab indent with spaces
2017-05-27 14:18:50 +02:00
Thomas Lindstrøm
0d0ab77db7 Update example with-scoped-stylesheets-and-postcss (#1606)
Fixes #1191
2017-05-27 14:12:37 +02:00
Miles Rausch
f0c646a366 Correct "yo" to "to" (#2078) 2017-05-27 13:14:21 +02:00
João Carmona
c443635945 feat(with-redux): add redux tools to example (#1994) 2017-05-25 18:37:10 +02:00
Olivier Tassinari
15e9573ded feat: add an example with the next branch of Material-UI (#2036) 2017-05-25 18:36:21 +02:00
RasmusErik Voel Jensen
8b90e6f148 example: with react-toolbox (#2047)
* example with react-toolbox

* JavaScript standard
2017-05-25 18:32:17 +02:00
Conor Dockry
dcac093b55 Remove stage-0 from package.json (#2028) 2017-05-20 19:55:48 +02:00
Olivier Tassinari
23a480964e Update layout.js (#2018) 2017-05-19 14:02:11 +02:00
David Ďurika
55b5dbf9cd Fix: point tar.gz to v3 branch (#2007)
* Fix: point tar.gz to v3 branch

* Update README.md
2017-05-18 15:53:52 -03:00
Ardani Rohman
443dceaeec improve example fallback translation and add new sample locale for lang id (#1983) 2017-05-17 19:41:54 +02:00
Johhan Santana
dff20eae01 add next.config.js for v3 next export example with-dynamic-import (#1976)
* add next.config.js file for static routes

* reverted start npm script to default

* eslint fix

* fix curl command in README

* remove next config
2017-05-16 09:19:31 +05:30
Arunoda Susiripala
f8317f158b Add an case to show when dynamic import components won't load. 2017-05-15 10:14:26 +05:30
Arunoda Susiripala
4d0147385c Merge v3-beta in dynamic-imports 2017-05-15 09:41:42 +05:30
Tim Neutkens
bc71b89b45 Remove stage-0 from example (#1959) 2017-05-13 13:01:29 +02:00
Tim Neutkens
2ea619658b Fix react-md example 2017-05-13 00:42:39 +02:00
Roland Warmerdam
f4d6cbfc19 Many improvements to the Apollo examples (#1905)
* Many improvements to the Apollo examples

* Use static properties
2017-05-11 00:23:11 +02:00
Grokling
7c8d0246e2 Add rehydration to example/aphrodite (#1858)
* Add rehydration to example/aphrodite

* linting

* replaced yarn.lock
2017-05-10 00:33:39 +02:00
Brikou CARRE
9f194677ec Upgrade jest and simplify .babelrc (#1913)
* Upgrade jest and simplify .babelrc

* Fix linter
2017-05-09 09:00:25 -07:00
Elliot Hesp
605161df8a [with-firebase] Ensure server credentials aren't bundled with client code (#1875)
* [with-firebase] Ensure server credentials aren't bundled with client code

* [with-firebase] Fix travis build failure
2017-05-08 21:53:48 +02:00
Roland Warmerdam
5c57b43e0a Fix production builds for the material-ui example (#1906)
Also remove redundant getMuiTheme() calls, handle injectTapEventPlugin()
better and use process.browser.
2017-05-07 15:51:12 +02:00
Grokling
c77e80be30 Update README.MD with warning about BETA version. Remove redundant note. (#1909) 2017-05-07 14:51:32 +02:00
Grokling
1b893518bb Add SSR to examples/with-styled-components + bump styled_components v2 (#1908) 2017-05-07 14:25:33 +02:00
Paul Xu
d1b47146d3 Update incorrect example reference in readme (#1901)
In the `with-refnux` eample.
2017-05-06 21:59:02 +02:00
Arana Jhonny
23574b5489 Support for cxs rehydration and removal of duplicate styles. (#1860)
* add cxs.rehydrate.

* add id='cxs-style'.
2017-05-06 11:37:47 -07:00
Trevor D. Miller
93a1b73efe Removing unneeded dev dependency (#1869)
babel-jest is included automatically by jest when a babel config is present, so including it manually here doesn't do anything.

> "Note: babel-jest is automatically installed when installing Jest and will automatically transform files if a babel configuration exists in your project."
http://facebook.github.io/jest/docs/en/getting-started.html#using-babel
2017-05-04 10:06:58 -07:00
jascha ehrenreich
6e89d49f99 fix typo (#1856) 2017-05-02 21:06:33 -07:00
David Madner
d1b61afcf8 Update README.md (#1851) 2017-05-02 09:12:24 -07:00
spencer
2e7bc1074d Update to examples: with-redux (updated) (#1813)
* With-Redux-example-update-request

Hello Next.js,

I’ve added an additional example to “With-Redux” and updated some of
the original code to help illustrate to less inexperienced developers
how to implement Redux with Next.js.

The example is a simple counter to help reinforce how the client and
server renderings work together. In addition I also updated some of the
redux boilerplate code to help fully demonstrate how redux can be
implemented when using is with Next.js

Please contact me at spencer.bigum@gmail.com for further questions or
anything else you might need.

Thanks,
Spencer

* fixed listing issues: examples/with-redux

* Updated code based on @impronunciable Feedback
2017-04-30 17:44:24 -03:00
Átila Fassina
c9d0670362 with-i18next example (#1496)
* examples/with-i18next: create folder and initial settings

* examples/with-i18next:abstract url and object keys - finish readme

* examples/with-i18next: next@beta is not actually necessary

* examples/with-it18next: fix standardjs eslint warnings

* examples/with-i18next: review updates
2017-04-30 07:35:07 -07:00
Craig Ramey
8d59de4d7a example curl pointed to with-styled-components, supposed to be with-flow (#1832) 2017-04-30 07:31:03 -07:00
Brendan Houle
03bfaecf49 Add root static files example (#1835) 2017-04-30 07:30:29 -07:00
Arana Jhonny
25dbcce60b fix #1833, update all examples. (#1834) 2017-04-30 07:29:37 -07:00
Arunoda Susiripala
686dd4c4dd Merge master into dynamic-import. 2017-04-27 08:48:43 -07:00
Arunoda Susiripala
7fcd1ea760 Add async-reactor example. 2017-04-27 08:22:25 -07:00
Colder Xihk
b52b91a840 fix typo in with-material-ui readme (#1797) 2017-04-26 13:27:37 +02:00
Paul Molluzzo
1eeb8820bb Add deply now buttons to with-firebase, with-material-ui, with-socket.io (#1779) 2017-04-22 15:37:04 +02:00
Daniel Steigerwald
2a14d32235 Fix Fela example (#1663)
* Fix Fela example

Styles must be set via the innerHTML. Otherwise, a fontFamily "Segoe
UI” will have encoded quotes.

* Add example

Which didn’t work previously.

* Fix lint
2017-04-22 15:09:35 +02:00
Sébastien Dubois
612f06b7cf Document skipping cache for babel-loader + setting env at runtime (#1747) 2017-04-22 14:57:09 +02:00
captDaylight
06baed2fe8 820 firebase (#1756)
* connecting to firebase

* login and logout with sessions

*  setting messages on the client side

* should have messages served on init

* set messages in state

* updating credentials

* updating readme

* more cred

* iron out eslint issues

* highlight where to put firebase variables

* fix problem of database listener not picking up changes on load

* remove isomorphic from main package.json
2017-04-22 14:56:28 +02:00
Dan Zajdband
bbb8ff75a5 Add/semantic ui example (#1753)
* Using developit/unfetch as the Fetch API polyfill

* Added Semantic UI React example

* Fixed linting issues
2017-04-22 14:54:35 +02:00
Sergio Daniel Xalambrí
1bb20b1930 Add socket.io example (#1766)
* Add socket.io example

* [update] stop handling events before unmount

* [update] add deploy to now button

* Fix linting problems

* Fix last missing linting problem
2017-04-22 14:53:48 +02:00
Ernesto Palafox
ce0a2f7b13 Add Material-UI example (#1771)
* Add Material-UI example

* Fix linting on material-ui example
2017-04-22 14:52:49 +02:00
Paul Molluzzo
d08e027a8c Add deploy now button to the top of all example READMEs (#1763)
* Add deploy now button to the top of all example READMEs

* Remove unnecessary whitespace changes
2017-04-22 14:51:51 +02:00
Ernesto Palafox
ba5601f6da Fix dependencies install error on 'with-url-object-routing' example (#1764) 2017-04-22 14:48:09 +02:00
Dan Zajdband
865263d24a Fix/amp example (#1755)
* Using developit/unfetch as the Fetch API polyfill

* Fixed amp example checking if the amp attribute is already present

* Fix lint
2017-04-19 11:59:04 +02:00
Arunoda Susiripala
b5a03a3896 Implement ssr=false support. 2017-04-18 22:21:31 +05:30
Arunoda Susiripala
f2bfcd01b0 Add an example with custom loading component. 2017-04-18 22:07:57 +05:30
Arunoda Susiripala
90ea471aa7 Merge master into dynamic-import. 2017-04-18 21:42:21 +05:30
Arunoda Susiripala
dfa28815a5 Add server side rendering for dynamic imports. 2017-04-18 01:45:50 +05:30
Arunoda Susiripala
f51300f14b Add core import() support. 2017-04-17 21:03:40 +05:30
Orlin M Bozhinov
b46502f8f1 corrected css pre-processing #readme link (#1709) 2017-04-14 17:54:55 -03:00
C. T. Lin
8e6615dcf9 upgrade react to v15.5 and use prop-types instead of React.PropTypes (#1684)
* upgrade react to v15.5 and use prop-types instead of React.PropTypes

* Update package.json
2017-04-11 00:05:26 +05:30
Remy Sharp
0487956c47 docs: don't blow away existing query string (#1638)
* docs: don't blow away existing query string

See comments in diff - I ran across this and it took me a while to work out why my client side code worked, but the server didn't. It was because I didn't realise that `.render`'s 3rd arg was the query object, so it was losing the _actual_ query string.

* chore: remove trailing spaces

¯\_(ツ)_/¯ I think!
2017-04-07 10:01:40 -07:00
Paul Molluzzo
12a7610d9a Add example using glamorous 💄 (#1620)
* Add example using glamorous 💄

* Fix linting errors

* Fix FOUC with server rendering and rehydration

* Camelcase CSS property names

* Fix title in README

* Fix typo in README
2017-04-05 17:54:42 -07:00
Vinay Puppal
897ff6c010 fix typo in with-universal-configuration example (#1628) 2017-04-05 17:54:00 -07:00
Alexander Ryzhikov
d10d80ce3c Fix react-helmet example missing initial props (#1598)
* Fix react-helmet example missing initial props

* Fix semicolon
2017-04-03 09:51:26 +05:30
Tim Neutkens
7f0591896a Use latest version of Next for all examples (#1597)
* Use latest for all examples

* Update yarn.lock
2017-04-03 09:46:35 +05:30
jwalter
9393440402 Remove babelrc from preact example doc (#1583)
The mentioned .babelrc usage is not needed for using preact with Next anymore. The actual code change was merged in (#1194)
2017-03-31 15:15:28 -07:00
Adam Soffer
c2036e1326 Create separate Apollo example without Redux integration (#1483)
* Add minimal apollo example

* Update apollo example README

* Update apollo example demo link in README

* Fix button styles

* Fix show more button

* Alias demo url

* Include the data field on the Apollo store when hydrating

* Revert

* Include the data field on the Apollo store when hydrating per tpreusse's suggestion.

* Add example to faq section in README

* Sort by newest; Add active state to buttons

* Make optimization suggestions

* Use process.browser; inline props

* Pass wrapped component's initial props into component heirarchy if they exist

* Remove unnecessary sorting of array

* Update Apollo example

* Remove trailing comma

* Update reduxRootKey

* Remove unnecessary babelrc

* Update with-apollo example

- Remove use of deprecated 'reduxRootKey' option
- Add loading indicator inside pagination button

* Fix with-apollo example pagination; Pass initialState to ApolloClient

* Split apollo example into two (one with and without Redux integration)

* Rename createClient private function to _initClient

* Set initialState default parameter inside initClient function

* Remove redux dep from with-apollo example
2017-03-30 11:21:13 -07:00
Dan Zajdband
d5369c01a8 Fix/example instructions (#1559)
* Using developit/unfetch as the Fetch API polyfill

* Fixed layout component example instructions
2017-03-29 12:00:13 -03:00
Tomas Roos
6de2477564 Mobx leaks memory on server side (#1550)
* Added server.js to configure useStaticRendering on start

* Update package to use server.js

* auto format with standard instead of prettier :( fixes broken test
2017-03-29 17:24:46 +05:30
Koji Ishimoto
5a11a86389 Add and update dependencies (#1531) 2017-03-28 08:22:46 +02:00
Arana Jhonny
e9d0aeb2b2 remove extra semicolon. (#1520) 2017-03-27 20:01:40 +05:30
David Ascher
84d4197a6d Add link (#1492) 2017-03-24 14:14:29 +01:00
Penn Su
b682267b50 Fix URL (#1467) 2017-03-21 09:40:09 +05:30