These are chat archives for reflux/refluxjs

2nd
Jun 2015
loveholly
@loveholly
Jun 02 2015 03:31
var Reflux = require('reflux'),
    request = require('superagent');


var TopicActions = Reflux.createAction([
        'clickTopickItem',
        'loadTopics', //首次加载topics列表
        'addTopic',
        'deleteTopic',
        'clickTopicItem'
    ]);
TopicActions.loadTopics.preEmit = function(){
    /*request.get('./topics',function(){
        console.log('fetching data from server');
    });*/
    console.log('loadTopics');
}
Who anybody else can tell me why I got an error message "Uncaught TypeError: Cannot set property 'preEmit' of undefined" with this code?
@spoike
Thanks
Nicolas Gotchac
@ngotchac
Jun 02 2015 05:24
You miss an 's' at 'createAction'
@loveholly
Prakhar Srivastav
@prakhar1989
Jun 02 2015 08:25
Hi! Can anyone give me some pointers on how to test Reflux applications?
This is my first react / reflux app, so I'm not sure where to start..
Also what should I test?
Since actions are just dispatched to the store, should i just write tests for the Store and the React Components?