This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Store | |
| import AppDispatcher from './dispatcher/AppDispatcher' | |
| const list$ = Rx.Subject.startWith([]) | |
| function addElement (action) { | |
| const newElement = action.data | |
| const currentValue = list$.getValue() | |
| list$.onNext(currentValue.concat(newElement)) | |
| } |
NewerOlder