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)
Fri, Nov 15, 4:30 AM
Unknown Object (File)
Fri, Nov 15, 1:04 AM
Unknown Object (File)
Tue, Nov 12, 7:15 PM
Unknown Object (File)
Tue, Nov 12, 3:47 PM
Unknown Object (File)
Sun, Nov 10, 12:27 PM
Unknown Object (File)
Fri, Nov 8, 7:02 PM
Unknown Object (File)
Fri, Nov 8, 7:02 PM
Unknown Object (File)
Fri, Nov 8, 7:01 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