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
Unknown Object (File)
Tue, May 7, 8:18 AM
Unknown Object (File)
Sat, May 4, 10:03 PM
Unknown Object (File)
Thu, May 2, 3:14 PM
Unknown Object (File)
Thu, May 2, 3:14 PM
Unknown Object (File)
Tue, Apr 16, 6:01 PM
Unknown Object (File)
Tue, Apr 16, 6:01 PM
Unknown Object (File)
Tue, Apr 16, 3:21 AM
Unknown Object (File)
Mon, Apr 15, 12:13 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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