Page MenuHomePhabricator

[lib] Add memoization to useMessagePreview
ClosedPublic

Authored by ashoat on Feb 3 2023, 12:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 16 2024, 6:56 PM
Unknown Object (File)
Oct 29 2024, 10:51 AM
Unknown Object (File)
Oct 28 2024, 12:39 AM
Unknown Object (File)
Oct 28 2024, 12:39 AM
Unknown Object (File)
Oct 28 2024, 12:38 AM
Unknown Object (File)
Oct 3 2024, 7:10 PM
Unknown Object (File)
Oct 3 2024, 12:33 PM
Unknown Object (File)
Oct 1 2024, 9:13 PM
Subscribers

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable