Commit graph

2150 commits

Author SHA1 Message Date
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
Vlad Frolov
1a61133dd4 fix(example): Added missing instructions for CSS "bundling" in with-react-md example (#1451) (#1456) 2017-03-18 11:45:48 +01:00
Tim Neutkens
1a7e804361 Document babel caching (#1432) 2017-03-15 20:47:31 +01:00
Henrik
8bd46c8380 Remove .DS_Store file from helmet example (#1435) 2017-03-15 20:36:47 +01:00
Stephen Mathieson
8cf965a753 examples: add svg-components (#982) 2017-03-15 15:26:08 +01:00
BDav24
db7c286740 [POC] Pretty url routing (#1001)
* [example] with pretty url routing

* use single quotes even in React components

* improve Link import
2017-03-15 15:24:54 +01:00
Steve Fan
a57fa7ebb1 An example with react-helmet (#1264)
* upload example

* fix

* fix

* fix

* fix .babelrc

* fix standard style

* fix indent

* rename helmetHead to helmet

* added gitignore

* package.json

* removed yarn.lock

* Added more examples of using react-helmet

* removed gitignore
2017-03-15 15:23:42 +01:00
Guilherme Diego
123a635f00 Example to create next application with scoped/external css. (#1340)
* First structure for external css example

* Remove: Builded files

* Fix: Identation to 2 spaces

* Fix example

* Fix lint

* Fix: Review points
2017-03-15 15:21:48 +01:00
Tim Neutkens
228bbbef74 Use jsonPageRes instead of xhr (#1424) 2017-03-15 08:07:29 +05:30
Adam Soffer
d5bd8c7d03 Update with-apollo example (#1394)
* 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
2017-03-14 23:41:55 +01:00
Tim Neutkens
68a7b59b19 Upgrade styled-components. Fixes #1416 (#1422) 2017-03-14 13:18:10 -07:00
Luke Edwards
4ad5e2e0dc Examples: Update Inferno & Preact (#1407)
* clean & bump inferno & preact pkgs

* reenable UglifyJS for preact
2017-03-13 22:05:04 +01:00
Jayden Seric
02e697cb0d Updated with-apollo example. (#1389)
- Deleted several unused dependencies.
- Updated dependencies.
- Simplified Apollo related imports thanks to react-apollo exporting apollo-client and graphql-tag since [v0.13.2](https://github.com/apollographql/react-apollo/blob/master/Changelog.md#0132).
- Tidied the readme and added a link to the Apollo docs.
2017-03-12 08:33:01 +01:00
Sergio Daniel Xalambrí
38822717a9 Add support for URL objects in Link and Router (#1345)
* Add support for URL objects in Link and Router

* Fix typo in comment

* Fix possible bug if the `href` prop is `null`

* Document the usage of URL objects in Link and Router

* Update readme.md

* Parse URL to get the host & hostname in `isLocal`

This should check if the current location and the checked URL have the same `host` or `hostname`.

* Format `as` parameter from object to string if required

* Format `href` and `as` inside the construct and componentWillReceiveProps

* Use `JSON.stringify` to compare objects

* Add usage example

* chore(package): update chromedriver to version 2.28.0 (#1386)

https://greenkeeper.io/

* Refactor the codebase a bit.

* Change the example name.

* Add a few test cases.

* Add the example to the README.
2017-03-12 09:27:51 +05:30
Larry Lu
4fb7e4bc64 Fix typo (#1380)
port 300 -> 3000
2017-03-10 09:10:44 +01:00
Sergio Daniel Xalambrí
bb3ceaadea Fix styled-components server-render example (#1382) 2017-03-10 09:07:28 +01:00
Tim Suchanek
40573317f7 Update README.md (#1368)
Fix graph.cool link in example
2017-03-07 14:47:31 +01:00
Tim Neutkens
bf9d34df37 Disable uglify the pretty way (#1351) 2017-03-06 08:53:00 -08:00
Arunoda Susiripala
f8f3fa7dce Introducing Shallow Routing (#1357)
* Simplify route info handling.

* Add basic resolve=false support.

* Make sure to render getInitialProps always if it's the first render.

* Change resolve=false to shallow routing.

* Add test cases for shallow routing.

* Update README for shallow routing docs.

* Update docs.

* Update docs.

* Update docs.
2017-03-06 08:48:35 -08:00
Conor Dockry
193eaf4c9e Add missing ! in using-preact example (#1355) (#1356) 2017-03-06 10:46:02 +05:30
Orlin M Bozhinov
563856f477 postcss-loader, postcss-easy-import, normalize.css and autoprefixer (#1352) 2017-03-05 07:48:37 -08:00
Tim Neutkens
5947716ff7 Implement preact/inferno SSR (#1346)
* Use module-alias to alias preact server side

* Use module-alias to alias inferno server side

* Remove unneeded routes example
2017-03-04 17:47:56 -08:00
Tim Neutkens
2a1f8ad387 Fix linting errors in standard 9.0 (#1333)
* Fix linting errors in standard 9.0

* Update lockfile
2017-03-02 16:17:41 -08:00
Arana Jhonny
bc47aac8f4 Fixed some problems with standard (#1331) 2017-03-02 22:46:16 +01:00
Orlin M Bozhinov
38cc82d0bc With global stylesheet paths (#1327)
* with-global-stylesheet without relative paths and with node_modules

* a parenthetical remark about material-components-web not being part of the example
2017-03-02 08:37:58 -08:00
fridays
7c8cd4bc69 Example with next-routes (#1290)
* Example with next-routes

* optimize description

* rename to with-next-routes
2017-03-01 09:42:47 -08:00
Arana Jhonny
68d48cb004 Update Koa example for Koa 2 with async/await (#1317) 2017-02-28 21:49:58 +01:00
Tim Neutkens
e1babdfe9d Render styled-jsx in _document example (#1287) 2017-02-28 05:15:49 +05:30
Tim Neutkens
f8f90955c5 Add prefetch to propTypes + flow typings (#1295) 2017-02-27 10:50:28 +05:30
Tim Neutkens
408633c1dc Remove traces of glamor (#1286)
* Remove traces of glamor

As talked about with @rauchg. Glamor takes up around 60KB of the bundle (pre-gzip). Since styled-jsx is the way to go now and we support adding glamor by the user we should remove it as dependency cause it is bundled even when not used.

Added rehydration to the example, since we did that in our code.

There is only one thing I'm not sure about and want to discuss:
what should we do with next/css. Right now I added a throw for when it is imported. I'm not sure if we should do that / some other way to notify the user it has been removed. The reasoning behind the throw is that when we would do a console.warn the user would see 'css.default.<X>' not found because we don't have the glamor dependency anymore.

* Update yarn.lock

* Remove test for styles
2017-02-26 17:58:00 +05:30
Sébastien Dubois
6ede206d82 update link prefetch syntax in examples (#1276) 2017-02-25 15:54:42 +01:00
Eric Ferraiuolo
e24db68f8b Add example app with React Intl (#1055)
* Add example app with React Intl

Fixes #1022

* Update examples/with-react-intl/package.json to be consistent
2017-02-24 22:45:18 +01:00
Tim Neutkens
9ba7a10f85 Fix linting errors (#1235) 2017-02-21 21:52:44 +01:00
Fabien Le Frapper
22c22efc35 Fix missing dependencies (#1232)
Tried to pull & run this example, it failed, complaining about missing react & react-dom dependencies
2017-02-21 16:40:18 +01:00
Davide Bertola
d4b018e91f add ‘with-refnux’ example (#1215) 2017-02-20 20:13:05 -08:00
Tim Neutkens
e5844314e3 Fix linting errors (#1197) 2017-02-18 20:12:19 +01:00
胡子大哈
bdd5b9ef3d Add note for next-connect-redux #1193 (#1203) 2017-02-18 19:39:34 +01:00
Guillermo Rauch
47e5231cdd Revert "Use the original idea of provider wrapper for redux example (#1201)"
This reverts commit ba54c6ac3d.
2017-02-18 14:11:54 -03:00
胡子大哈
ba54c6ac3d Use the original idea of provider wrapper for redux example (#1201)
Use the original idea of provider wrapper from #1193 and remove
unnecessary `initStore` in every page.
2017-02-18 14:03:02 -03:00
Kirill Konshin
f0cb5b71a0 Added next-redux-wrapper to example (#1196)
* Added next-redux-wrapper to example

* Docs, renamed withRedux
2017-02-18 01:10:27 -03:00
Tim Neutkens
00590d7181 Remove babelrc for preact example (#1194) 2017-02-17 20:03:02 -03:00
Thomas Lindstrøm
6e5d57dae9 Add example with-scoped-stylesheets-and-postcss (#1146)
* Add example `with-external-stylesheets-and-postcss`

* 🔥 Remove extra semi-colon

* 📝 Attribute `with-global-stylesheet`

* Force a new test

* 📝 Update README.md

* Rename `external` -> `scoped`
2017-02-17 16:04:58 +01:00
Dan Zajdband
e33a7dbc25 Now that we have react-dom as a peerDependency this import issue was fixed (#1183) 2017-02-16 19:44:43 -03:00
Tim Neutkens
ff547752f0 Fix HMR issue with webpack-stats-analyzer (#1149)
* Use stats.json instead of running server

* Add suggested changes
2017-02-15 21:42:48 +09:00
Giuseppe
db97fbffad Fix with-styled-jsx-postcss example (#1147) 2017-02-15 11:57:15 +01:00
Arunoda Susiripala
14c86bef1d Introduce a simple prefetching solution (#957)
* Implement a very simple prefetching solution.

* Remove next-prefetcher.

* Require 'whatwg-fetch' only in the client.

* Use xhr in the code.

* Use a simple fetching solution.

* Fix 404 and xhr status issue.

* Move the prefetching implementation to next/router.

* Add deprecated warnning for next/prefetch

* Run only 2 parellel prefetching request at a time.

* Change xhr to jsonPageRes.

* Improve the prefetching logic.

* Add unit tests covering the Router.prefetch()

* Update examples to use the new syntax.

* Update docs.

* Use execOnce() to manage warn printing.

* Remove prefetcher building from the flyfile.js
Because, we no longer use it.
2017-02-15 14:22:22 +05:30
Sébastien Dubois
3c7237169f ssr-caching: document way to configure cache key (#1133)
* ssr-caching: document way to configure cache key

* simplify comment
2017-02-14 22:01:50 +05:30
Tim Neutkens
2f7cc9c33c Add webpack-bundle-analyzer example (#1110) 2017-02-14 07:54:50 +05:30
sfhardman
dbc2ceefde Return a promise from getRequestHandler execution, await _serveStatic in serveStaticWithGzip, update custom-server-hapi to complete request lifecycle (#1099) 2017-02-12 23:12:32 -03:00
Arunoda Susiripala
b220193167 Babelrc false babelrc (#1094)
* Detect babelrc disabling via babelrc.

* Simplify boolean condition.
2017-02-13 06:18:22 +09:00
Davide Bertola
19f1125520 add global stylesheet example (#1016)
* add global stylesheet example

* fix avoiding html-escape of stylesheets

* update readme

* remove .gitignore
2017-02-12 00:22:35 +01:00
Tim Neutkens
c106a1d02f Using router example improvements (#1034) 2017-02-09 22:02:01 +05:30
Arunoda Susiripala
57b6e9a71b Using styled-jsx for with-jest example. (#1052) 2017-02-09 19:14:52 +05:30
Giacomo Rebonato
b00f0c2044 TypeScript example proposal (#845)
* TypeScript example proposal

* removed unused loader

Removed typings

Moved TypeScript to dev dependencies

removed unused typings

changed react typings version

removed react dependency

set next dependency version to latest

removed not needed babel preset

enabled sourcemaps

simplified tsconfig

modified component to be a functional one

* Ignore build

* Making npm script Windows-friendly

* Clean up

* Added readme

* fixed typo
2017-02-09 12:36:58 +01:00
Arunoda Susiripala
bdcb0f7828 Add support to transpile import/export syntax (#1044)
next/babel doesn't transpile import/export.
So, we need to do it explicitly, but only for test env.
2017-02-09 08:32:58 +05:30
Naoyuki Kanezawa
9348762f4a add next/error (#1040) 2017-02-08 16:59:33 -03:00
Lukas Strassel
4a73ccbb00 add react and react dom as peer (#1024)
- tackles #997
- add ./idea to gitignore for webstorm users
- update all the examples
2017-02-08 10:11:38 +05:30
Adam Soffer
01cc898450 Update Apollo example (#1021)
* 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
2017-02-07 12:02:28 +01:00
Emanuel Kluge
f6510c05b2 Pass parsed request-URL into the run-method (#1000) 2017-02-05 12:38:20 -03:00
Sergio Daniel Xalambrí
592c666e82 [example] Progressive rendered application (#998)
* [add] example of a progressive rendered app

* [update] remove extra blank line

* [update] fix typo

* [update] more use cases

* [update] example link

* Update README.md

* [update] next.js dependency version

* [update] fix readme typos
2017-02-05 13:43:28 +01:00
Koutaro Chikuba
267b74b256 Add next.js flowtype definition to with-flow example (#973)
* Add next.js flowtype definition to with-flow

* Add render api types for flow

* Add prefetch types

* Fix push/replace api types to promise
2017-02-05 19:39:51 +09:00
Tim Neutkens
a8731d0651 Added universal configuration example (#991)
* Added universal configuration example

* Make example more clear
2017-02-05 04:43:23 +05:30
Arunoda Susiripala
57e9a5e5f6 Find custom babel config location properly. (#969)
* Find custom babel config location properly.
Earlier we simply check for the .bablerc file in the dir.
But the actual logic is much complex.
Now we are using the babel's actual logic to find the
custom config location.

* Fix failing tests.
2017-02-03 14:33:35 +09:00
Vlad Frolov
fca0a39cbc examples/with-react-md: Fixed "Cannot read property 'focus' of undefined" (#961) 2017-02-02 22:56:07 +01:00
Tim Neutkens
61bdae5a08 Fix typo in react-md example readme (#959) 2017-02-02 20:00:45 +01:00
Vlad Frolov
0a2466a36e Added React-MD example (#940) 2017-02-02 13:10:59 +01:00
Tim Neutkens
59281adef3 Allow parsed url to be passed down (#950)
* Allow parsed url to be passed down

* Update example to reflect url passing

* Check if passed url.query is empty

* Rename url to parsedUrl
2017-02-02 12:21:08 +05:30
Tim Neutkens
0820204646 Remove yarn.lock from examples (#912)
* Remove yarn.lock from examples

* Add yarn.lock to gitignore for examples

* Move yarn ignore to examples directory
2017-01-29 05:48:53 +05:30
Sébastien Dubois
a3bec7666b with-apollo: Don't store Redux store and Apollo client in global namespace (#909)
* Add yarn lockfile

* Avoid storing Redux store and Apollo client in global namespace + don't create Apollo client when already existing in browser
2017-01-28 17:22:32 +01:00
Stephen Mathieson
ee717af088 examples/with-redux: remove global store (#908)
This patch removes the global `store` on the client. IMO this example
should avoid polluting the global namespace with simple scoping tricks
can solve the problem equally as well.
2017-01-27 18:33:42 -08:00
Adam Soffer
8310f812ec Fix Apollo Example (#900)
* 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
2017-01-27 17:06:17 +01:00
jcsmesquita
8922e7b63a Update README.md (#895)
Just adding download instructions
2017-01-26 23:19:12 +05:30
Adam Soffer
a76ec83b64 Update Apollo Example (#888)
* 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
2017-01-25 17:10:21 -08:00
Dan Zajdband
3ad3a6c1e7 Added Google AMP example (#793)
* Added Google AMP example

* Added styles and a second page

* Using regular anchor since there is no client-side routing

* Added comment on react config for amp
2017-01-24 05:20:56 -08:00
jagreehal
cbb2d1c250 simpler flow task (#857) 2017-01-23 22:19:14 -08:00
Robin Frischmann
8d8d5ebdf6 Example using Fela (#863)
* added example using fela

* update package-json

* removed nested routing test

* fixed linting issues

* fixed typo
2017-01-23 20:29:15 -03:00
Adam Soffer
4b257483e2 Add Apollo example (#780)
* 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
2017-01-22 13:27:06 +01:00
Kristo Jorgenson
e67d62d888 Update styled-component docs (#841)
* Add details to custom Document documentation

Custom document must be created at ./Pages/_document.js, which is not
noted in the README… so I updated it.

* Add note to styled-components example about existing issue

* Made phrasing a bit more clear

* Another phrasing update.

* from P to p
2017-01-21 22:24:17 +01:00
Arunoda Susiripala
399e510389 Make sure lastAppProps always have some value. (#829)
* Make sure lastAppProps always have some value.

* Revert "Make sure lastAppProps always have some value."

This reverts commit b4ae722d9c1a4460e17dbdc041b111cbd492b2aa.

* Throw an error, if we found an empty object from getInitialProps.

* Add proper tests for getInitialProps empty check.
2017-01-20 11:33:46 -08:00
jagreehal
1e77568657 added example with flow (#814)
* added  example with flow

* Fixed linting errors
2017-01-19 01:48:55 -08:00
Arunoda Susiripala
2efabde215 Fix koa-404 issue by adding res.statusCode to 200 (#815) 2017-01-18 00:45:29 -03:00
Dan Zajdband
2c2d961844 Added Koa example (#800)
* Added Koa example

* Linted koa example
2017-01-17 08:23:06 +01:00
Dan Zajdband
e28f80cd99 Updated <Link> in repo, always wrapping an anchor. (#798) 2017-01-16 22:27:55 +01:00
Sébastien Dubois
a66ff658f4 Fix link (#789)
* Fix link

* Fix links
2017-01-16 18:23:24 -03:00
Dan Zajdband
7cc554c67a Fixed hapi example (#795) 2017-01-16 11:27:07 -08:00
Sébastien Dubois
ffeeb682af Remove useless config override (#790) 2017-01-16 14:24:33 -03:00
Sébastien Dubois
8fa630d855 Add dynamic routing keyword (#788)
I was looking for "dynamic routing" in the examples and didn't find it because that keyword isn't used.
2017-01-16 23:33:11 +09:00
Giuseppe
0d6ceec8db Add styled-jsx-postcss example (#781)
* Add styled-jsx-postcss example

* Remove commented code
2017-01-15 19:59:22 -08:00
Tim Neutkens
b6e72f59e5 Use UTC time to avoid time differences (#782) 2017-01-15 16:14:40 -08:00
nkzawa
8a06c7b092 example: fix style 2017-01-15 00:30:39 +09:00
Shawn Kelly
5ef34c6dd8 update styletron example to support multiple stylesheets (#763) 2017-01-13 15:49:35 -08:00
Arunoda Susiripala
7be5797cc2 Use the preact-compat dist version. (#760) 2017-01-13 11:40:07 -03:00
Huang Xuan
c19b82dfe2 Fix title of README (#720) 2017-01-10 11:32:32 -08:00
sfhardman
ec302aa289 Add custom server example using Hapi (#712) 2017-01-09 18:35:10 -08:00
Tim Neutkens
f3ee901fa6 Use next.js beta for example (#710) 2017-01-09 13:40:45 -08:00
Mike Bannister
2e0f9d144b Fix link (#701) 2017-01-08 12:30:29 -08:00
Bernat Orell
3b1f7115a3 Routing on the client with Redux (#691)
* Routing on the client with Redux

* Removing unused import
2017-01-08 07:04:35 -08:00
Donald Hruska
4ac8e137cf Update README.md (#687) 2017-01-07 09:19:07 +09:00
Florian Didron
13feb8855d Adds mobx example (#676)
* Adds mobx example

* Fix coding style to match JS Standard

* Removes unecessary link

* Update README.md

* Update README.md

* Change next version from beta to ^2.0.0-beta

* Assigns the store to a local var

* Adds navigation in the example

* Removes unecessary imports

* Fix coding style to match JS Standard

* Fix Clock import
2017-01-06 03:38:51 -08:00
Alex Moldovan
07f717061f Added layout component example (#560)
* added layout component example

* coding style fixes

* trailing spaces removed

* updated README file

* added layout example in docs

* moved .babelrc so that it handles all projects from the examples folder
2017-01-05 13:03:36 -08:00
Arana Jhonny
e01056d3f1 example using inferno v1.0.* (#663)
* example using inferno v1.0.*

* fix name.
2017-01-05 09:26:01 -08:00
Arana Jhonny
1d700d0240 Aphrodite example. (#634)
* add aphrodite example

* fix props

* Update README.md
2017-01-03 10:06:04 -08:00
Arana Jhonny
856978918e Add cxs example. (#613)
* add cxs example

* fix example location
2017-01-01 22:35:14 -08:00
nkzawa
64aa4454ac examples: fix SSR of styled-components 2017-01-01 20:24:48 +09:00
Arunoda Susiripala
c890dc3573 Implement Router Events (#511)
* Move route loading logic to a common place.

* Add router events.

* Add EventEmitter's core API methods.

* Add example app for loading events and docs.

* Fix some typos.

* Get rid of Router.ready()

* Remove events package.
It's already shipping with webpack.

* Handling aborting properly.

* Expose simple attribute based events listener API.
Removed the proposed event listener API from the public API.

* Remove error logged when there's an abort error.
There are many other ways to capture this error.
So, it doesn't look nice to print this always.

* Change router events to pass only the current URL as arguments.

* Add a section about Cancelled Routes to README.
2016-12-30 17:15:22 -08:00
Stephen Mathieson
369bc873f8 examples/nested-components: use an apostrophe rather than a prime (#566)
This is just my OCD, but this file is much easier on the eyes when apostrophes are used rather than primes. It's also proper, as the [prime](https://en.wikipedia.org/wiki/Prime_(symbol)) is used in mathematics, not written English.
2016-12-29 10:50:36 -08:00
Dan Zajdband
31703d4c78 Fixed log on component prefetch (#563) 2016-12-29 22:56:22 +09:00
Naoyuki Kanezawa
917a96a1cd set build and start npm scripts on all examples (#549) 2016-12-28 10:12:24 -08:00
Arunoda Susiripala
1ba315fcc1 Add a preact example. (#543)
* Add preact example.

* Update .babelrc
2016-12-27 10:58:10 -08:00
nkzawa
de7801df2d example: fix npm script (fix #526) 2016-12-27 23:39:00 +09:00
Arunoda Susiripala
d580b8f0c9 Use ^2.0.0-beta as the version for with-prefetching example. (#530) 2016-12-26 12:37:03 -08:00
Arunoda Susiripala
ac2a71876d Add support for using .babelrc in the app root. (#493)
* Add support for using .babelrc in the app root.

* Update the README about the .babelrc usage.

* Fix a typo.

* Remove additional example usage.
2016-12-26 10:13:45 -08:00
nkzawa
1888a251a8 fix npm script on examples 2016-12-26 12:59:09 +09:00
Ian Mitchell
355dbf8fdd Fix SSR Cache Example (#510) 2016-12-25 00:38:35 +05:30
Dan Zajdband
01e1883f79 Added glamor example and pointing warning to css migration guide (#500) 2016-12-23 11:18:25 -08:00
Arunoda Susiripala
b9bee24787 Add an example with SSR caching. (#497)
* Add an example with SSR caching.

* Update server.js

* Update README.md

* Use app.renderError to display errors in SSR example.
2016-12-23 09:13:52 -08:00
Naoyuki Kanezawa
01da6f4761 Add styletron example (#486)
* add styletron example

* example: fix link

* example: improve README

* Added styletron example reference to readme and merge with master
2016-12-23 08:01:24 -05:00
Dan Zajdband
f6ece560e4 Add/data fetch example (#485)
* Added data fetch example

* Finished updating examples install instructions and added data-fetch example to main readme
2016-12-23 08:05:49 +09:00
nkzawa
414a22d38e examples: fix README titles 2016-12-23 07:57:57 +09:00
nkzawa
cf727eb1e1 typo 2016-12-23 06:43:18 +09:00
Dan Zajdband
2b791a6653 Added missing readme and references in main readme. (#483)
* Added missing readme and references in main readme.

* Fixed wrong links

* Updated examples format
2016-12-22 13:04:32 -08:00
Arunoda Susiripala
362626d0d4 Update the next to the least supported version. (#478) 2016-12-22 20:41:50 +09:00
nkzawa
cae706d7b7 examples: use HTTPS URL 2016-12-22 18:14:12 +09:00
nkzawa
aa630279e6 examples: simplify download instruction 2016-12-22 18:07:54 +09:00
nkzawa
b8291abeac improve the styled-component example 2016-12-22 17:16:33 +09:00
Dan Zajdband
c5d69f0585 Add/move examples (#470)
* Added redux and styled components (wip) examples.

* Updated examples readmes and package.json

* Fixed styled-components example
2016-12-21 21:10:54 -08:00
Arunoda Susiripala
1719738ed1 Allow to customize our babel configuration (#466)
* Add a way to customize babel configurations.

* Add babel configuration docs to README.
2016-12-21 17:36:00 -08:00
Arunoda Susiripala
f1c6ea3248 Fix Jest example app (#458)
* Add a working JEST example app.

* Add README.md

* Move react-test-renderer to devDeps.

* Add a newline to the .babelrc
2016-12-21 23:06:24 +09:00
Dan Zajdband
bacb42ead4 Updated README with new features and code fixes (#444)
* Updated README with new features and code fixes

* Removed staticMarkup option from docs.

* Fixed quiet parameter info.
2016-12-20 14:57:11 -08:00
Guillermo Rauch
b337433d14 Update index.js 2016-12-20 13:03:44 -08:00
Guillermo Rauch
1af5bc98bb Update README.md 2016-12-20 12:45:27 -08:00
Guillermo Rauch
9056116c5b Update Header.js 2016-12-20 12:44:23 -08:00
Guillermo Rauch
376661254d Update index.js 2016-12-20 12:41:40 -08:00
Guillermo Rauch
a27f6b0af6 Update features.js 2016-12-20 12:41:26 -08:00
Guillermo Rauch
8129eea237 Update contact.js 2016-12-20 12:41:15 -08:00
Guillermo Rauch
36255e5c5d Update about.js 2016-12-20 12:41:01 -08:00
Guillermo Rauch
2c2d7ad6d5 Update index.js 2016-12-20 12:40:26 -08:00
Guillermo Rauch
100c12b5fe Update about.js 2016-12-20 12:39:34 -08:00
Guillermo Rauch
41c73a3aa7 Update Header.js 2016-12-20 12:39:15 -08:00
Guillermo Rauch
cded884581 Update post.js 2016-12-20 12:38:10 -08:00
Guillermo Rauch
587c976ef0 Update paragraph.js 2016-12-20 12:37:58 -08:00
Guillermo Rauch
b2c5d40b5f Update about.js 2016-12-20 12:37:38 -08:00
Guillermo Rauch
e4d59c087d Update README.md 2016-12-20 12:37:24 -08:00
Guillermo Rauch
35869daee5 Update Header.js 2016-12-20 12:36:30 -08:00
Guillermo Rauch
c4c63ab401 Update index.js 2016-12-20 12:36:03 -08:00
Guillermo Rauch
16cab95a57 Update index.js 2016-12-20 12:35:48 -08:00
Guillermo Rauch
f51696be08 Update blog.js 2016-12-20 12:35:34 -08:00
Guillermo Rauch
ff62d6f631 Update index.js 2016-12-20 12:35:11 -08:00
Guillermo Rauch
0754ac0790 Update about.js 2016-12-20 12:34:56 -08:00
Guillermo Rauch
dcf1187f58 Update index.js 2016-12-20 12:34:42 -08:00
Guillermo Rauch
7482ac6398 Update index.js 2016-12-20 12:34:27 -08:00
Guillermo Rauch
f4ccfd9e04 Update b.js 2016-12-20 12:34:15 -08:00
Guillermo Rauch
1b694bd8a8 Update a.js 2016-12-20 12:34:04 -08:00
Guillermo Rauch
280655da62 Update index.js 2016-12-20 12:33:47 -08:00
Arunoda Susiripala
141c045c68 Make next/router a client only API. (#443)
* Prevent using 'next/router' APIs inside 'getInitialProps'

* Remove incorrect documentation.

* Make next/router a client only API.
2016-12-20 09:27:43 -08:00
Naoyuki Kanezawa
a87ef1a7af Incorporate styled-jsx (#420)
* integrate styled-jsx

* define styles of pages with styled-jsx

* bump styled-jsx

* bump styled-jsx

* error-debug: fix style

* bump styled-jsx

* fix examples to use styled-jsx

* bump styled-jsx
2016-12-19 10:42:19 -08:00
Arunoda Susiripala
22776c2eee Implement the Singleton Router API (#429)
* Immplement the initial singleton Router.

* Use the new SingletonRouter for HMR error handling.

* Use SingletonRouter inside the Link.

* Create an example app using the Router.

* Make the url parameter optional in Router.push and Router.replace

* Add a section about next/router in the README.
2016-12-19 06:40:26 -08:00
Arunoda Susiripala
b62a0e8f55 Bundle all the modules inside the app (#414)
* Remove the use of CDN and bundle everything inside the app.
We still pre-build the prefetcher because it needs
different webpack config which only targets browsers
supports Service Workers.

* Remove cdn config item.
We no longer using it.

* Stop adding script tags when staticMarkup=true

* Remove babel-plugin-transform-remove-strict-mode NPM module.
2016-12-17 17:49:10 +09:00
Naoyuki Kanezawa
1708222381 Programmatic API (#310)
* add 'next' api

* add render APIs

* add 'as' prop to Link

* check Accept header to serve json response

* check if response was finished on getInitialProps call

* move server/app to server/index

* load webpack-hot-middleware-client by absolute path

* server: options for testing

* add tests

* example: improve

* server: make dir optional

* fix client routing

* add parameterized routing example

* link: fix display url

* Add custom-server-express example (#352)

* Add custom-server-express example

* Remove extraneous nexts in express routes defs

* Update next config in server.js

* Handle accept headers totally inside Next.js (#385)

* Handle accept headers totally inside Next.js
Now user doesn't need to handle it anymore.

* Move json pages serving to /_next/pages base path.

* Join paths correctly.

* remove next/render
2016-12-16 12:33:08 -08:00
Arunoda Susiripala
36abdc77c5 Prefetch pages with Service Workers (#375)
* Register the service worker.

* Update prefetcher code to do prefetching.

* Implement the core prefetching API.
support "import <Link>, { prefetch } from 'next/prefetch'"

* Implement a better communication system with the service worker.

* Add a separate example for prefetching

* Fix some typos.

* Initiate service worker support even prefetching is not used.
This is pretty important since initiating will reset the cache.
If we don't do this, it's possible to have old cached resources
after the user decided to remove all of the prefetching logic.
In this case, even the page didn't prefetch it'll use the
previously cached pages. That because of there might be a already running
service worker.

* Use url module to get pathname.

* Move prefetcher code to the client from pages
Now we also do a webpack build for the prefetcher code.

* Add prefetching docs to the README.md

* Fix some typo.

* Register service worker only if asked to prefetch
We also clean the cache always, even we initialize
the service worker or not.
2016-12-15 11:13:40 -08:00
Arunoda Susiripala
65c4e1e5bd Init next.js even after dom is loaded. (#326)
Earlier we add a event to init next.js when dom has loaded.
But if at that time dom is already loaded, next.js won't get init ever.
Now we are using domready NPM module which handle these for us.
2016-12-02 22:59:10 +09:00
Arunoda Susiripala
fcd59adea1 Add support for webpack's CommonsChunkPlugin and remove next bundle (#301)
* Add example app which demonstrate the problem.

* Add the first working version.

* Fix lint issues.

* Add README.md

* Use /_next/main.js as the main file URI

* Add the support for loading the core next bundle.

* Optimize the output by removing Next modules from pages.

* Use the same package.json as master use.

* Change the example repo's README for simpler instructions.

* Change example projects package.json to support next build and start.

* Change main.js into commons.js.

* Add support for hot core reload and errors.

* Introduce require based on eval-script.

* Add error reporting support with hot reloading.

* Update README.md
2016-11-28 09:15:56 +09:00
nkzawa
4ea933725d example: add missing dependencies and babel config 2016-10-29 22:20:29 +09:00
Tryggvi Gylfason
9ad0e57e6e Update readme.md (#128) 2016-10-28 16:58:41 +09:00
nkzawa
9a78dd8d1c fix jest example styles 2016-10-26 19:28:41 +09:00
Pavithra Kodmad
95719c956e Adds jest configuration npm run test shows failed results (#60) 2016-10-26 19:17:02 +09:00
nkzawa
83400a8f38 fix usage of next/css 2016-10-25 17:16:54 +09:00
Dan Zajdband
e164074f8e Added glamor css (#38)
* Added glamor css

* Using pseudoclasses instead of calling functions

* Updated readme using style instead of default import for css
2016-10-21 09:39:20 -07:00
Dan Zajdband
1477734211 Added linting using standard (#27)
* Added linting using standard

* Linting on test
2016-10-16 17:00:17 -07:00
Guillermo Rauch
89089f5546 add some basic examples 2016-10-15 23:31:05 -05:00