we're running a SPA. dispatched actions (not components) are auth-based.

is it possible to intercept and transform dispatched actions?

i.e.

```
dispatch({
    type: 'FOO',
    payload: { some: value }
})

function magicMiddleware(action) => decide if authorized. 
if no...

dispatch({
    type: 'BAR',
    payload: { new: value }
})

else continue

```

note that 'FOO' should never hit a reducer