HomePhabricator
Diffusion Comm a5988bd9d97d

[lib] Introduce aux user store reducer and action types

Description

[lib] Introduce aux user store reducer and action types

Summary:
Introduces the aux user store reducer and fid setter action type

Depends on D11511

Test Plan:
Ran the following code

const onPressSave = React.useCallback(async () => {
  dispatch({
    type: setFarcasterFriendsFIDActionType,
    payload: {
      farcasterUsers: [
        {
          userID: 'dispatch_test_userID_1',
          username: 'dispatch_test_username_1',
          farcasterID: 'dispatch_test_farcasterID_1',
        },
      ],
    },
  });
  dispatch({
    type: setFarcasterFriendsFIDActionType,
    payload: {
      farcasterUsers: [
        {
          userID: 'dispatch_test_userID_2',
          username: 'dispatch_test_username_2',
          farcasterID: 'dispatch_test_farcasterID_3',
        },
      ],
    },
  });
  dispatch({
    type: setFarcasterFriendsFIDActionType,
    payload: {
      farcasterUsers: [
        {
          userID: 'dispatch_test_userID_1',
          username: 'dispatch_test_username_1',
          farcasterID: 'dispatch_test_farcasterID_update',
        },
      ],
    },
  });
}, [dispatch]);

Screenshot 2024-04-02 at 9.51.45 PM.png (1×1 px, 325 KB)

Reviewers: atul, ginsu, kamil

Reviewed By: atul

Subscribers: ashoat, tomek

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

Details

Provenance
willAuthored on Apr 1 2024, 12:52 PM
Reviewer
atul
Differential Revision
D11528: [lib] Introduce aux user store reducer and action types
Parents
rCOMM7760faea083c: [sqlite] implement processing aux user store ops on worker
Branches
Unknown
Tags
Unknown