Twitter | Search | |
Dan Abramov 20 Nov 16
Good thread on the problems with Redux Thunk. Indeed “glorified setters” is a very common misuse of Redux.
Reply Retweet Like
Dan Abramov 20 Nov 16
Replying to @dan_abramov
If your actions creator names start with set* and you often call multiple in a row, you might be missing the point of using Redux.
Reply Retweet Like
Dan Abramov
The point is to decouple “what happened” from “how the state changes”. “Setter” action creators defeat the purpose, conflating the two.
Reply Retweet Like More
Dan Abramov 20 Nov 16
Replying to @dan_abramov
They are also inefficient and may lead to inconsistent UI. Dispatching multiple times is an escape hatch and should be used sparingly.
Reply Retweet Like
Dan Abramov 20 Nov 16
Replying to @dan_abramov
Why don’t we explain this in the docs? When we wrote them we did so for Flux users and assumed understanding of what Flux actions are.
Reply Retweet Like