HomePhabricator
Diffusion Comm 462d81234c37

[lib] Add memoization to useMessagePreview

Description

[lib] Add memoization to useMessagePreview

Summary: MessagePreview on native and web don't need this, but web/modals/threads/subchannels/subchannel.react.js and web/modals/threads/sidebars/sidebar.react.js sort of do since the result of useMessagePreview gets passed to a React.useMemo. Not clear if those particular React.useMemos are very useful, but this is still good practice in case eg. other places call this in the future.

Test Plan: Flow

Reviewers: atul

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on Feb 2 2023, 12:27 PM
Reviewer
atul
Differential Revision
D6561: [lib] Add memoization to useMessagePreview
Parents
rCOMMa5af3803c67b: [lib] Simplify messageTitle and introduce default for robotext
Branches
Unknown
Tags
Unknown