- Cozy: store information about cozy (konnectors, accounts, settings, db)
- Ecolyo: store all states used for this app
For a better state management, combineReducers(reducers) is used to split the reducing function into seperate functions. So, each managing independent parts of the state.
| modal | ModalState | store opening state of the feedback modal <br><br>ModalState enum<br>- _isFeedbacksOpen = boolean_ |
| challenge | ChallengeState | store challenge state such as: list of user challenge, data load and current challenge <br><br>ChallengeState enum<br>- _userChallengeList = UserChallenge[]_<br>- _currentChallenge = UserChallenge_<br>- _currentDataload = Dataload[]_ |
### Updating state process
Redux-thunk middleware is configured. For now, it is used only for updating the profile.
To update a state, a webservice method is called before trigger a state change inside the store.