4 ms·
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
by thecolorblue 9y ago
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.