HomePhabricator
Diffusion Comm b2d47db05431

[lib] Prevent SET_AUX_USER_FIDS from overwriting state when no changes

Description

[lib] Prevent SET_AUX_USER_FIDS from overwriting state when no changes

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

Reviewers: will, varun

Reviewed By: will

Subscribers: tomek

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