1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
Commit graph

5 commits

Author SHA1 Message Date
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
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
Tim Neutkens 24c1ac6ca9
Use canary for all example downloads (#3411) 2017-12-06 18:12:42 -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
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