Skip to content

Commit

Permalink
init README
Browse files Browse the repository at this point in the history
  • Loading branch information
euZebe committed May 23, 2018
1 parent 5caa4bb commit c93c122
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# slides and code examples about _Redux patterns_ talk

## slides
- They are visible when opening the served index.html (using webstorm, right click / open in browser)

## Mölkky code example
- launch möllky example in a terminal, using `node src/molkky-vanilla-redux.js`
- comment/uncomment some lines (marked with FIXME) in the reducer to illustrate the immutability requirement (at every level of your state)

## other code example
- `yarn start` to launch a web app and play with redux devtools
- `npm test src/store/articles.spec.js` to launch tests
- comment/uncomment the lines marked with FIXME in the reducer to illustrate deepFreeze action
2 changes: 1 addition & 1 deletion src/molkky-vanilla-redux.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function rootReducer(previousState = {}, action) {

// else, several pins fell

// TODO: toggle this block and the next one to make reducer unpure
// FIXME: toggle this block and the next one to make reducer unpure
const nextPlayerState = {
...previousPlayerState,
score: previousPlayerState.score + fallenPins.length,
Expand Down

0 comments on commit c93c122

Please sign in to comment.