Skip to content

Commit

Permalink
Fix lint errors for README
Browse files Browse the repository at this point in the history
  • Loading branch information
ellbee committed Oct 27, 2015
1 parent 2cb62b0 commit 680cb99
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To specify how the actions transform the state tree, you write pure *reducers*.
That’s it!

```js
import { createStore } from 'redux';
import { createStore } from 'redux'

/**
* This is a reducer, a pure function with (state, action) => state signature.
Expand All @@ -78,30 +78,30 @@ import { createStore } from 'redux';
function counter(state = 0, action) {
switch (action.type) {
case 'INCREMENT':
return state + 1;
return state + 1
case 'DECREMENT':
return state - 1;
return state - 1
default:
return state;
return state
}
}

// Create a Redux store holding the state of your app.
// Its API is { subscribe, dispatch, getState }.
let store = createStore(counter);
let store = createStore(counter)

// You can subscribe to the updates manually, or use bindings to your view layer.
store.subscribe(() =>
console.log(store.getState())
);
)

// The only way to mutate the internal state is to dispatch an action.
// The actions can be serialized, logged or stored and later replayed.
store.dispatch({ type: 'INCREMENT' });
store.dispatch({ type: 'INCREMENT' })
// 1
store.dispatch({ type: 'INCREMENT' });
store.dispatch({ type: 'INCREMENT' })
// 2
store.dispatch({ type: 'DECREMENT' });
store.dispatch({ type: 'DECREMENT' })
// 1
```

Expand Down

0 comments on commit 680cb99

Please sign in to comment.