ComposeMenu [nfc]: Convert to functional component.#4796
ComposeMenu [nfc]: Convert to functional component.#4796WesleyAC wants to merge 1 commit intozulip:mainfrom
Conversation
chrisbobbe
left a comment
There was a problem hiding this comment.
Thanks! See one small comment below.
| const { destinationNarrow } = props; | ||
| const dispatch = useDispatch(); | ||
|
|
||
| const uploadFileCallback = useCallback( |
There was a problem hiding this comment.
nit: This useCallback isn't doing much; uploadFileCallback's callers are functions that get recreated each time the ComposeMenu renders (they aren't using useCallback), and those functions are being passed to various children.
|
Thanks for this refactor! I agree with Chris's small comment, and everything else looks good. Other than cutting that |
This was step one in a UX change I was planning to make. I got sidetracked due to problems with the library I was planning to use (callstack/react-native-paper#2769), but I figure I'd push this refactor commit anyways.