3 ms·
And most of that came from Flux to begin with (as seen in https://facebook.github.io/react/blog/2014/07/30/flux-actions-and-the-dispatcher.html#actions-and-acti
by acemarke 10y ago
And most of that came from Flux to begin with (as seen in https://facebook.github.io/react/blog/2014/07/30/flux-actions-and-the-dispatcher.html#actions-and-actioncreators https://facebook.github.io/react/blog/2014/07/30/flux-action... ). There's also a lot of interesting parallels with the Win32 WndProc functions, as discussed in https://bitquabit.com/post/the-more-things-change/ https://bitquabit.com/post/the-more-things-change/ and https://bitquabit.com/post/the-more-things-change/ https://bitquabit.com/post/the-more-things-change/ .
That said, you are absolutely encouraged to abstract over that process as much as you want! For example, the https://github.com/acdlite/redux-actions https://github.com/acdlite/redux-actions library will generate both the action constants and the action creators for you, and there's many more similar utilities.
- acemarke 10y agoWhoops, just noticed the bad copy-and-paste. Meant to link to the HN discussion for that article: https://news.ycombinator.com/item?id=10381015 https://news.ycombinator.com/item?id=10381015 .