Page MenuHomePhabricator

[lib] update `reduceUserInfos` to return ops
ClosedPublic

Authored by kamil on Nov 16 2023, 5:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 5:22 PM
Unknown Object (File)
Sat, Oct 26, 8:25 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Unknown Object (File)
Sep 28 2024, 9:01 PM
Unknown Object (File)
Sep 28 2024, 8:55 PM
Unknown Object (File)
Aug 28 2024, 5:00 AM
Subscribers

Details

Summary

Return ops to process in on DB later.

We have two options here:

  1. Return ops only when states are different - better for performance
  2. Always return ops - might result in processing ops giving the same result but helps when states (redux and DB) diverge

I don't think states could be different at any point so going with option 1.

Depends on D9802

Test Plan

Just a refactor so Flow. Functionality tested later in the stack

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Nov 16 2023, 7:03 AM

Do we use a similar approach in other reducers? Should we use the same approach there?

This revision is now accepted and ready to land.Nov 17 2023, 7:22 AM
In D9908#289295, @tomek wrote:

Do we use a similar approach in other reducers? Should we use the same approach there?

It's only in this reducer and I kept it as before, created a task to discuss it: ENG-5803.