issue: ENG-6424
Please see the notion dock in which I decribe the decission made for each field.
Details
I will test this with the next diff, which will update the reducers. I will dispatch the actions, and check if the app baheves as expected. Puting this up now, because this a lot to thing through
Diff Detail
- Repository
- rCOMM Comm
- Branch
- inka/login_reducers
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/redux/state-types.js | ||
---|---|---|
30 | I can't see how this gets used eventually, but I'm guessing that you will add some logic in the master reducer BEFORE it calls the other reducers, that will reset the state to defaultState EXCEPT this list? Then the other reducers will receive this "cleared" state as input, and the master reducer will return their output? Asking because I want to make sure that fields like currentUserInfo don't need to be included here (they would if you were calling the other reducers BEFORE your new state-clearing logic). | |
33 | Since dataLoaded gets updated by the reducer for identity actions anyways, I don't think we need to include it in this list. If the reducer updates the field anyways, we only need to know if the reducer needs to know the old value of the field. If the reducer doesn't need to know the old value of the field, then we can remove it from this list, to keep the list small and concise. What do you think? Let me know if I'm missing anything | |
35 | I don't think we should include this. The notif permission alert maximum should be user-specific | |
43 | In the doc you say:
If we want to clear this data, shouldn't it be removed from the list? | |
web/redux/redux-setup.js | ||
69 | See above – I think we should remove | |
72 | See above – I think we should remove | |
74 | See above – I think we should remove |
native/redux/state-types.js | ||
---|---|---|
30 | Yes, this is the plan! Main reducers on web and native will clear the state apart from fields specified in this list. Then, this cleared state will continue on its way through these reducers, to master reducer, and to specific reducers. currentUserInfo will be cleared, and then set by reduceCurrentUserInfo reducer. | |
33 | I think you are right. Since we won't be clearing the state on recovery logins, dataLoaded can be set to false by the clearing function. | |
43 | Yes, of course, sorry, this is a mistake |