Skip to content

Instantly share code, notes, and snippets.

@carlesba
carlesba / index.js
Created January 12, 2016 17:48
Basic RxJS with Flux example
// 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))
}