4 ms·
My brain I guess works in a different way. I could never truly understand/appreciate value of the Redux for state management (well except that it is better then
by FpUser 7y ago
My brain I guess works in a different way. I could never truly understand/appreciate value of the Redux for state management (well except that it is better then nothing).
For this type of things I've always used one or the other implementation of State Machine pattern. Seems way more clear to me.
It is not just about JavaScript. State management is a part of many applications and State Machine is a nice paradigm to work with. At least for my taste.
- acemarke 7y agoThe key values of Redux are separating state update logic from the rest of the app, emphasizing writing as much logic as possible as pure functions that are easy to test, and enabling developers to better understand when, where, why, and how their state is changing over time. Note that it's entirely possible to write your reducer logic as state machines, and in fact we explicitly encourage that : https://redux.js.org/style-guide/style-guide#treat-reducers-as-state-machines https://redux.js.org/style-guide/style-guide#treat-reducers-...
- FpUser 7y agoIn my opinion State Machine is sufficient on it's own. To me reducers seem superfluous and in fact distracting from actually managing state. But as already said it is my own opinion coming from my own experience. We do not need to convince each other