HomePhabricator
Diffusion Comm 2ce8245fa6e2

[native] Pull static fns out of `ChatThreadList` to `ChatThreadListUtils`

Description

[native] Pull static fns out of ChatThreadList to ChatThreadListUtils

Summary:
There are a handful of static functions in the ChatThreadList component. Figured I'd move these out to a separate utils file.

(I initially had a huge diff that converted ChatThreadList to a functional component and added various memoizations. However, I realized that diff would be pretty difficult to review so I'm breaking down the refactor into hopefully easier to review pieces.)

This diff is just one step in the process of converting ChatThreadList into a functional component. When this work is done, we will be able to avoid a lot of re-rendering and hopefully improve performance quite a bit.

In subsequent diffs will

  1. Lift up "search-related" JSX
  2. etc.. continue turning ChatThreadList into a functional component so we can more precisely memoize things, particularly ChatThreadListItems.

Depends on D9134

Test Plan: Search experience continues to work as expected. Can search for users/threads/etc. as before.

Reviewers: ginsu, tomek, rohan

Reviewed By: ginsu

Subscribers: ashoat

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

Details

Provenance
atulAuthored on Sep 11 2023, 3:19 PM
Reviewer
ginsu
Differential Revision
D9135: [native] Pull static fns out of `ChatThreadList` to `ChatThreadListUtils`
Parents
rCOMMcdad23dbed9c: [native] Lift `searchUsers` and `onChangeSearchText` to…
Branches
Unknown
Tags
Unknown