This is because components get an empty array from getInitialState , and this happens after calling trigger .
init is called when the repository instance is created, which means that the trigger in fetchThreads is called immediately before the component is installed. When the listener is later installed, it gets an empty array from the store on getInitialState .
I would suggest the following change:
window.threadStore = Reflux.createStore init: -> @state = loaded: false threads: [] @fetchThreads() getInitialState: -> @state
source share