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)
Sat, Nov 23, 1:51 PM
Unknown Object (File)
Tue, Nov 12, 2:36 AM
Unknown Object (File)
Tue, Nov 12, 2:08 AM
Unknown Object (File)
Fri, Nov 8, 1:04 AM
Unknown Object (File)
Oct 27 2024, 5:22 PM
Unknown Object (File)
Oct 26 2024, 8:25 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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.