
Dispatching actions with Redux - aurorema
https://blog.bam.tech/developper-news/4-ways-to-dispatch-actions-with-redux
======
thecolorblue
I would not suggest 1). If the action is synchronous, use 2). If it is
asynchronous, use 3).

Limit the amount of code that has access to dispatch. Where you do access
dispatch, focus only on what is required for dispatching an action. It will
make your code easier to debug and, in the long run, your code will be more
re-usable.

------
Scarblac
I so often have logic that goes "get this thing from the Redux state if it's
already in there; if it isn't, go fetch it (and we'll return here later when
it's added to the state)".

Seems others don't have that experience, I never see examples that do that in
articles.

~~~
wry_discontent
I often have the issue where I need access to some piece of state, like an id,
which I can’t readily access in an action creator without using thunk, which I
think encourages bad design.

------
choward
This article is about react with redux not just redux. Misleading title.

