Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
rikutiira committed Sep 5, 2016
1 parent 4b48e35 commit 7bb4042
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 30,10 @@ const store = {
todos: create([], //give initial value to your store
//use reducer to listen to observable source, todos are added to store as it emits new values
reducer('newTodosFromServer', todosFromServer$, (currentState, todo) => currentState.concat(todo)),

//you can push data to reducer with no observable source as shown in consumer.js
reducer('newTodosFromClient', (currentState, todo) => currentState.concat(todo)).
reducer('newTodosFromClient', (currentState, todo) => currentState.concat(todo)),

//you can omit the name if there is no need to observe or call the reducer from outside
//also notice "merge" helper which can be used to listen to multiple observable sources
reducer(merge(deleteTodo$, deleteTodos$), (currentState, deletableTodos) => {
Expand Down

0 comments on commit 7bb4042

Please sign in to comment.