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, Nov 26, 4:47 AM
Unknown Object (File)
Tue, Nov 26, 4:39 AM
Unknown Object (File)
Tue, Nov 26, 2:20 AM
Unknown Object (File)
Tue, Nov 26, 1:02 AM
Unknown Object (File)
Sun, Nov 24, 2:03 AM
Unknown Object (File)
Wed, Nov 20, 9:07 PM
Unknown Object (File)
Sat, Nov 16, 1:03 AM
Unknown Object (File)
Sat, Nov 16, 12:05 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
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