These are chat archives for reflux/refluxjs

May 2015
Alex Castaño
May 07 2015 15:03
Hello, who is suppose to do an ajax call in a reflux, an action or a store? It feels better in the action, however the action needs more information to some requests. On the other hand if I add to the store it seems very messy adding to many responsibilities for one class.
May 07 2015 16:23
From what I understood, the ajax promise should be called in preEmit property of the reflux action
May 07 2015 16:30

Actually in my project I wrote a wrapper for it and my action definitions look like this:

        promise: AnalyticsApi.startReport,
        shouldEmit: ()=>{return Ag3PermissionChecker.checkDownloadAnalyticReport()},
        // type validation
        params: {
            deal_id: {
                type: 'number',
                required: true

which creates an async actions, that does listenAndPromise , and make some checks