1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples
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
..
active-class-name Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
basic-css Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
custom-server Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
custom-server-express (custom-server-express) avoid a 404 when navigating to a custom route (#3645) 2018-01-31 22:38:36 +01:00
custom-server-fastify Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
custom-server-hapi Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
custom-server-koa Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
custom-server-micro Update custom-server-micro example to latest version (#3594) 2018-01-31 09:22:43 +01:00
custom-server-nodemon Update Next.js version on examples 2018-01-30 21:46:15 +01:00
custom-server-polka add Polka server example (#3588) 2018-01-31 09:24:38 +01:00
data-fetch Merge branch 'master' into fix/canary 2018-01-13 06:33:19 +01:00
form-handler Update Next.js version on examples 2018-01-30 21:46:15 +01:00
gh-pages Format subhead in gh-pages README example (#3670) 2018-02-03 20:03:47 +01:00
head-elements Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
hello-world Universal Webpack (#3578) 2018-01-30 16:44:44 +01:00
layout-component Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
nested-components Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
only-client-render-external-dependencies Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
page-transitions Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
parameterized-routing Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
pass-server-data Example: Passing data from server through API (#2594) 2018-02-03 17:11:47 +01:00
progressive-render Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
root-static-files Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
shared-modules Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
ssr-caching Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
svg-components Fix SVG component example dependencies (#3448) 2017-12-13 01:44:11 -08:00
using-inferno Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
using-nerv Example: Passing data from server through API (#2594) 2018-02-03 17:11:47 +01:00
using-preact Update preact example 2018-01-31 11:19:34 +01:00
using-router Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
using-with-router Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-absolute-imports Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-algolia-react-instantsearch Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-amp Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-analytics Add an example using analytics (#3580) 2018-01-31 10:35:27 +01:00
with-ant-design Update Ant Design example (#3485) 2018-01-06 17:14:22 +01:00
with-antd-mobile Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-aphrodite Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-apollo [with-apollo] Use getDataFromTree in browser (#3457) 2018-02-04 12:36:35 +01:00
with-apollo-and-redux [fix] apollo-redux: Separate out entire example #3463 (#3629) 2018-01-31 10:40:32 +01:00
with-apollo-auth Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-asset-imports Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-babel-macros Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-cerebral Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-configured-preset-env Upgrade React for all examples (#3113) 2017-10-17 08:11:46 +02:00
with-custom-babel-config Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-custom-reverse-proxy Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-cxs Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-data-prefetch Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-dotenv Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-dynamic-import Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-electron Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-emotion Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-emotion-fiber Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-external-scoped-css Deprecate css examples 2018-01-31 11:19:34 +01:00
with-fela Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-firebase-authentication Fix Doc in with-firebase-authentication (#3626) 2018-01-27 15:12:25 +01:00
with-firebase-hosting Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-flow upgraded flow version and updated code to use of React.Node (#2) (#3635) 2018-01-30 21:11:37 +01:00
with-freactal Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-glamor Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-glamorous Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-global-stylesheet Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-global-stylesheet-simple Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-hashed-statics Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-higher-order-component examples: add create-next-app (#3377) 2017-12-02 20:30:17 -08:00
with-i18next Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-ioc Added IoC example (#3595) 2018-01-31 08:36:20 +01:00
with-jest [with-jest] Upgrade to jest 22 and so remove raf deps (#3477) 2017-12-19 10:29:29 +01:00
with-kea Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-loading Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-markdown Add markdown-in-js example (#3410) 2017-12-06 18:20:38 -08:00
with-material-ui Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-material-ui-next Updated material-ui-next URI (#3509) 2017-12-28 16:25:11 +01:00
with-mobx Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-mobx-state-tree Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-next-routes Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-noscript examples: add create-next-app (#3377) 2017-12-02 20:30:17 -08:00
with-pkg Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-polyfills [Example] with-polyfills : show how to load polyfills (#3568) 2018-02-04 11:50:48 +01:00
with-portals [with-portals] Remove dynamic import, add <Portal /> (#3571) 2018-01-31 10:35:59 +01:00
with-prefetching Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-pretty-url-routing Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-react-ga Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-react-helmet Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-react-i18next Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-react-intl Fixed the example with-react-intl, cannot read property 'locale' of undefined (#3392) 2018-02-02 20:13:05 +01:00
with-react-md Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-react-toolbox Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-react-uwp Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-react-with-styles Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-reasonml Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-rebass Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-recompose Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-redux Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-redux-code-splitting Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-redux-observable Refactor redux observable example (#3495) 2018-02-04 12:56:32 +01:00
with-redux-reselect-recompose Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-redux-saga fix(store): product env cannot find module 'redux-devtools-extension'. (#3618) 2018-01-26 17:09:49 +01:00
with-reflux Examples/with reflux (#3476) 2017-12-19 10:33:01 +01:00
with-refnux Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-relay-modern Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-scoped-stylesheets-and-postcss Deprecate css examples 2018-01-31 11:19:34 +01:00
with-semantic-ui Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-sentry examples: add create-next-app (#3377) 2017-12-02 20:30:17 -08:00
with-shallow-routing Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-socket.io Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-static-export Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-styled-components Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-styled-jsx-plugins Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-styled-jsx-postcss Make styled-jsx configurable (#3050) 2017-10-15 19:54:57 +02:00
with-styled-jsx-scss Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-styletron Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-sw-precache Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-tailwindcss Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-typescript Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-universal-configuration Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-universal-configuration-runtime Update Next.js version on examples 2018-01-30 21:46:15 +01:00
with-url-object-routing Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-webpack-bundle-analyzer Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-webpack-bundle-size-analyzer Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -08:00
with-zones Update Next.js version on examples 2018-01-30 21:46:15 +01:00
.babelrc Babelrc false babelrc (#1094) 2017-02-13 06:18:22 +09:00
.gitignore Remove yarn.lock from examples (#912) 2017-01-29 05:48:53 +05:30