Page MenuHomePhabricator

[Flow202][web][skip-ci] [1/x] Fix Flow issues with useDispatch / useSelector being underconstrained
ClosedPublic

Authored by ashoat on Nov 8 2023, 11:29 AM.
Tags
None
Referenced Files
F3557190: D9767.id33821.diff
Fri, Dec 27, 12:01 AM
Unknown Object (File)
Wed, Dec 25, 12:53 PM
Unknown Object (File)
Wed, Dec 25, 12:28 PM
Unknown Object (File)
Sun, Dec 15, 4:54 PM
Unknown Object (File)
Sun, Dec 15, 1:25 AM
Unknown Object (File)
Sat, Dec 14, 7:24 PM
Unknown Object (File)
Thu, Dec 12, 2:35 AM
Unknown Object (File)
Sun, Dec 1, 5:41 PM
Subscribers

Details

Summary

The new version of Flow is requiring function calls to provide explicit type params when Flow isn't able to infer them.

While Flow isn't able to infer types from the generic useSelector in react-redux, our version of it has explicit types, and doesn't have that issue.

This diff migrates all of the errant imports of react-redux's useSelector to use ours. It also switches useDispatch to the one introduced in D9694.

NOTE: CI will fail on this diff. I considered the possibility of fixing Flow errors BEFORE upgrading Flow, but it wasn't possible... in some cases, the fixes to support the new version of Flow caused errors in the old version. I could have hidden these type errors with $FlowFixMe lines and then later revert those, but that seemed like too much busy work.

Depends on D9751

Test Plan

Confirm the Flow errors go away

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 8 2023, 11:40 AM
Harbormaster failed remote builds in B23915: Diff 32953!
This revision is now accepted and ready to land.Nov 9 2023, 11:43 AM
ashoat retitled this revision from [Flow202][web] [1/x] Fix Flow issues with useDispatch / useSelector being underconstrained to [Flow202][web][skip-ci] [1/x] Fix Flow issues with useDispatch / useSelector being underconstrained.Nov 19 2023, 5:00 PM