Open OmarMuhtaseb opened 8 years ago
passing anything else than a Promise from local
causes this issue. And even if you pass a Promise it never resolves.
Workaround to this is something like
remote(state) {
if(state.categories) {
return Promise.resolve(state.categories);
}
return WebService.request("/categories.json", WebMethods.GET);
}
I'm trying to create a simple Alt flux example, using store, action, view and Source. However, I'm having a problem moving the data from source to store as in Alt Flux Handling Async. What I got when I try to access the store new function "performSearch" is
In the following code, I'm trying to access the performSearch function in App.jsx, as it is a function of OrganizationStore.js once I used registerAsync(Source).
source.js
OrganizationStore.js
OrganizationActions.js
App.jsx