austinmao / reduxity

React-redux via UniRx + Redux.NET for Unity3D
MIT License
50 stars 4 forks source link

State tree is mutated and entire state tree is not returned #1

Open austinmao opened 7 years ago

austinmao commented 7 years ago

Reducers are mutating state trees and the entire state tree is not being returned. This can be solved by cloning the state tree before entering the reducer and mutating the loaded instance.

Note: I can't find immutable libraries for Unity :(

austinmao commented 7 years ago

Sharing state between reducers is considered an anti-pattern: http://redux.js.org/docs/faq/Reducers.html#how-do-i-share-state-between-two-reducers-do-i-have-to-use-combinereducers