|
|
|
|
|
by Longwelwind
3024 days ago
|
|
Can someone explain to me why someone would choose Redux over something like MobX ? I feel like implements an action for each modification of state (or group of modifications) requires a lot of boilerplate code. In MobX, you treat your data tree as a separate entity, and simply modify it. The UI is automatically updated whenever it needs to. Mobx isn't bad performance-wise, I think, since it only re-renders the components that are listening to the modified variables when a modification occurs. The only advantage I see is being able to rewind the state store, which can be quite cool when debugging. I have done some medium-sized application (only games), and I don't think I've run into any performance or readability problem with MobX. I've never done web apps with a team, though, but I don't think Redux would specially make it easier to work with other programmers. |
|
Another big one is being able to restore the state. In Redux, it's just one giant object that can be easily serialized and use in the future. With Mobx, I'm guessing you have to write deserialize logic for your various classes.