HomePhabricator
Diffusion Comm c48e1e23f6aa

[lib] Move user infos update reducer into specs

Description

[lib] Move user infos update reducer into specs

Summary:
Create new state by merging infos from store with the ones from action, and then iterate through the updates and apply the function from a spec. Changed the approach slightly - instead of mutating the freshly created new state, return a new one from a spec (might be less performant, but is more maintainable).

Depends on D9268

https://linear.app/comm/issue/ENG-4241/handle-processupdatesactiontype-as-a-part-of-a-spec

Test Plan: Check if updating user infos work correctly: when adding a new user and deleting them.

Reviewers: kamil, bartek, inka

Reviewed By: kamil

Subscribers: ashoat, michal

Differential Revision: https://phab.comm.dev/D9296

Details

Provenance
tomekAuthored on Sep 26 2023, 3:43 AM
Reviewer
kamil
Differential Revision
D9296: [lib] Move user infos update reducer into specs
Parents
rCOMMcd7e9efe23ea: [lib] Move current user updates logic into a spec
Branches
Unknown
Tags
Unknown