You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Flux-ism is to have a single global list/registry of actions. When you have a single list, it's useful to have several levels of nesting. I would love to have something like:
so that I could call something like actions.foo.subFoo2.subFoo2a(...)
The action creator does recursively iterate, but the key is just the json-ification of the Object -- the subaction exists, but it's at actions.foo['[object Object]'].subFoo2a()
While this does generalize action creation in an interesting way, I personally think this makes the API more confusing than necessary. I would personally push back against this feature, but I'd like to open the discussion up again. This sounds like a good Reflux plugin or helper.
A Flux-ism is to have a single global list/registry of actions. When you have a single list, it's useful to have several levels of nesting. I would love to have something like:
so that I could call something like
actions.foo.subFoo2.subFoo2a(...)
The action creator does recursively iterate, but the key is just the json-ification of the Object -- the subaction exists, but it's at
actions.foo['[object Object]'].subFoo2a()
Probably a one-liner at: https://github.com/reflux/refluxjs/blob/v0.2.11/src/createAction.js#L44 -- just change it to
var name = _.isObject(definition.children[i]) ? definition.children[i].actionName : definition.children[i];
Haven't tested extensively thoughThe text was updated successfully, but these errors were encountered: