Page MenuHomePhabricator

[lib] Prevent SET_AUX_USER_FIDS from overwriting state when no changes
ClosedPublic

Authored by ashoat on Sep 24 2024, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 6:24 PM
Unknown Object (File)
Fri, Nov 22, 8:24 AM
Unknown Object (File)
Nov 19 2024, 11:01 AM
Unknown Object (File)
Nov 17 2024, 5:48 PM
Unknown Object (File)
Nov 15 2024, 4:30 AM
Unknown Object (File)
Nov 15 2024, 1:04 AM
Unknown Object (File)
Nov 12 2024, 7:15 PM
Unknown Object (File)
Nov 12 2024, 3:47 PM
Subscribers

Details

Summary

I was seeing a React render cycle after introducing D13443. When I updated useUpdateRelationships to depend on auxUserInfos, it caused the hook to get generated when auxUserInfos changed. This caused the effect in FarcasterDataHandler to run again, which resulted in auxUserInfos changing again.

To break this loop, this diff makes sure we only change auxUserInfos if there are actual changes.

Depends on D13443

Test Plan

Confirm that the React render cycle no longer prevents me from logging in as the commeth account

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable