We need to call setENSNames on some things that are derived from the component's state. To access the state from a hook, we need to convert the whole component to a hook.
Details
Details
- Reviewers
atul - Commits
- rCOMM3d89c376054b: [native] Convert AddUsersModal to hook
Tested and played around with AddUsersModal in iOS Simulator. Selected a user, unselected them, selected two users, added them to the modal. Verifed button enabled/disabled as expected. Also Flow
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Didn't read through this too carefully since it seems like a fairly straightforward refactor + the Test Plan looks good. Can do a more thorough review if you think that would be good.
| native/chat/settings/add-users-modal.react.js | ||
|---|---|---|
| 88–93 ↗ | (On Diff #21528) | We've got these same six lines in a couple places. Could probably just pull them out into a separate utility function at some point. |
| 105 ↗ | (On Diff #21528) | Can we switch this positionally with next line so it's directly above the callback where it's used in conditional? |