yoshuawuyts / barracks

:mountain_railway: action dispatcher for unidirectional data flows
MIT License
177 stars 22 forks source link

consume `flux-standard-action`s out of the box? #25

Closed yoshuawuyts closed 9 years ago

yoshuawuyts commented 9 years ago

Instead of having to wrap .emit(), barracks could detect if the action name is an object and proceed from there:

old

// consume `flux standard actions`
// obj -> null
function fsaWrap (action) {
  assert.ok(isFsa(action), action + ' is not a flux standard action')
  d(action.type, action)
}

new

 d(action)
yoshuawuyts commented 9 years ago

Closed in #26