-
-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace connect
with useSelector
in all our component definitions.
#4837
Comments
Sounds good! There's one place where we know we need I've just merged #4838 and #4844, and it looks like There's also a number of places where we do the same thing except we provide type arguments to
One of those is the type-wrapper Do those cases also cause this sort of trouble, or do the type parameters make it OK? In any case, if you run out of easy conversions and there are still a few left, we can always do annotations for those, even if the codemod is no help. For |
An instance of zulip#4837.
An instance of zulip#4837.
An instance of zulip#4837.
…ct`. An instance of zulip#4837.
An instance of zulip#4837. Making sure to keep our chosen annotation for `stream`, which is looser than `getStreamInNarrow`'s return type. See b21bf43 and zulip#4520 (comment).
An instance of zulip#4837.
An instance of zulip#4837.
…ct`. An instance of zulip#4837.
An instance of zulip#4837. Making sure to keep our chosen annotation for `stream`, which is looser than `getStreamInNarrow`'s return type. See b21bf43 and zulip#4520 (comment).
An instance of zulip#4837.
We've found another reason to do this: it'll help simplify the React Native v0.64 upgrade (#4426). We'll want to get closer to enabling a Flow feature called "Types-First", and add a few targeted suppressions where it turns out to be substantial work to satisfy Flow.
See #4426 (comment) and following.See #4907.Having tried Types-First experimentally, I get several dozen complaints that our exported component definitions that are made with
connect
aren't sufficiently annotated. The codemod Flow provides seems to stumble and not be able to fix these automatically. While we could do them by hand, it's probably cleanest and easiest just to get rid of theconnect
calls.We've already gotten a good start on converting our components to function components. We should continue, with particular interest in the ones that use
connect
. There are 36 as of writing this.The text was updated successfully, but these errors were encountered: