Hacker News new | past | comments | ask | show | jobs | submit login

I completely agree that Fluxible feels very verbose.. Did you try Reflux.js?



reflux.js isomorphic support is still in flux https://github.com/spoike/refluxjs/issues/144


(fluxible dev here)

Which part of Fluxible feels verbose?


- dispatching and listening to actions. you need to pack your action with a magic string and a param object then unpack the params again in every listener. It's easy to forget what the params names are and its hard to see what the function gets as params just from its signature.

It would be much nicer to have e.g.:

   context.actions.myAction('foo', 'bar')
And

   onMyAction: function(foo, bar)
- dealing with asynchronous data fetches. The example shows that you should create 3 actions for every async data action: FETCH_STARTED, FETCH_COMPLETE and FETCH_ERROR.

How would you deal with cases where you need to fetch multiple data sources then combine them? Seems like the number of actions would quickly explode. Also, how would you deal with dependencies and errors?

- the service api:

    context.service.read('message', {}, {}, function (err, messages)
too many optional params, kinda hard to keep track what goes where.

I'd prefer something with promises.

- I also miss query params support in fluxible router


For me, it's really the part where you end up having to wrap up all of your actions with `context.executeAction`.

It would be cool if there was a nice way that you could wrap an action with a function to generate that boilerplate for you, similar to how Bluebird's `Promise.promisify(myFunction)` generates a Promise-wrapped function for anything following the typical Node callback style.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: