Side effects in Fluxible?

38 views Asked by At

Here's what I'm trying to do---add a listener to a fluxible event to do an ajax call. In Redux, this is called a side effect and there are several ways of doing this (ex: create "side effects" using redux-saga, which are just listeners that do stuff). In Flux, one approach is to do side effects in the Store.

What about fluxible?

From what I can tell, the way to do this is in the Store. But I don't see a way to get the context. So perhaps there's another way to do this?

1

There are 1 answers

0
Tomas Kirda On

You should do ajax call in action. Action receives context, where you could provide plugin to do http call. Stores should contain only application state and have only synchronous code.