-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[v8] Port React-Redux to TypeScript #1737
Comments
I'm down to help! If no one else has done so by the time I get off work today, I'll spin up a branch and at least configure typescript so we can start working. |
Tell you what. In the interest of keeping collaboration centralized, I'm going to go ahead and create an integration branch here in the main repo. That way we can have PRs and code progress in one place. |
Okay, I just created a new https://github.com/reduxjs/react-redux/tree/typescript-port branch . Let's use that as the target for all PRs for this effort. I'll create a draft integration PR for visibility once we have a first couple commits on that branch. A couple points to consider:
|
Is there any plan / structure on how contributors should start converting .js to .ts? So that, we don't get two people working on the same set of files at the same time. Perhaps something like "sub-issues" to this issue to keep track of which files are being worked on. |
What you see here is all the discussion so far :) I can help provide some direction and coordination a bit, but I don't have time to be seriously active with this effort for now. So, this needs to be a collaborative thing. That includes filing issues or anything else that needs to be done to help track the work. |
Okay, we've got some basic TS build integration in place, and the first couple files (context and Provider) ported over. I suspect some of the pieces of |
Hello, I'd love to help |
Hi Guys 👋 Very nice initiative 🙌 I'd like to start something on Let me know If it's good. @markerikson If you think I could start on something "better". Let me know ^^ |
I just merged #1743 , which converted several of the smaller files to TS. If we look at the https://github.com/reduxjs/react-redux/tree/typescript-port branch , here's what's left file-wise atm:
There's also all the test files that will need to be converted over, and I don't know if we have the test setup itself configured to build / run TS files yet. We also will probably need to copy-paste over additional types and typedefs from the current I think we ought to save the three biggest pieces of the actual source for last: So, I'd suggest folks should claim a couple of the other files in |
Well @markerikson ^^ I'll start something on Ok for y'all ? |
Yep, go for it. |
@markerikson hi |
@myNameIsDu : no one's claimed it yet, but I think it might be good if I try doing that one myself. Should have some time to try it this weekend. |
Well, if there's anything I can do, please let me know. I'd be happy to take part in it |
Hi there 👋 I can follow up with |
@tony-go yep, go right ahead! |
As a heads-up: we recently converted the RTK repo to Yarn v2, and I'm working to convert the React-Redux repo to Yarn v2 based on this If anyone else is planning to do PRs for this, be aware that this change is coming (hopefully shortly). |
Yarn v2 switch done via #1751 . Please update your clones/forks as needed. |
FYI, I'm starting to tackle I think this is the last of the meaningful files that need to be converted. However:
So, still plenty left to do here. |
I just did a bunch of reworking of the @StevenLangbroek , @myNameIsDu : I think there's a good chance this could fix whatever type issues you were seeing while converting tests. Try merging/rebasing and let me know what happens. |
@StevenLangbroek How should I cooperate with you?:smiley: |
OK, I will start by fixing the file under test=>hooks. If you want to get involved, please be careful not to clash |
I will fixing the file under test=>components. If you want to get involved, please be careful not to clash 😃 |
Hey @myNameIsDu! So regarding how to collaborate, I think (given the fact that Github doesn't support Stacked PRs) we have 2 options, either is fine for me:
I think 2 is easiest, if you'd rather work some other way I'd love to hear it. |
I also think the second of these two methods easier However, I don't think it's that troublesome, We just need to separate our files so that there is no conflict 😏 |
@markerikson If want to delete ConnectAdvanced, will the test case be rewritten? If so, I will not continue to convert it |
@markerikson What do you need me to do next? Because you are changing to connect, I did not change connect.test |
@myNameIsDu The It's just that I'd say go ahead and convert |
Ok, I'm going to convert connect.spec.js, which is exciting 😏 |
I've just merged the TS integration PR at #1739 into I created a We still have some test files left to convert, but we can continue that work against Thank you SO much to everyone who's contributed to this effort! |
The actual TS conversion work is done, including all source and test files, and we're now up to https://github.com/reduxjs/react-redux/releases/tag/v8.0.0-beta.0 . Closing this - thank you everyone who helped! |
React-Redux is currently written in plain JS, and our types have been maintained by the community over in DefinitelyTyped at https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-redux/ .
Whenever we get around to writing a React-Redux version 8, we intend to port the library to be written in TypeScript directly.
While we don't yet have plans to work on a new version, it's likely that might happen in the next few months because of React 18 and the Concurrent Rendering changes in that release.
It would be helpful if we could start the work of porting React-Redux to TS now, even if it's just a draft on a branch, so that we have that complex work done ahead of time and can then look at any compat changes for React 18 separately without trying to do both at once.
We maintainers probably don't have the time to tackle this ourselves right now, but I'd love to see the community work on that port so we get it ready.
The text was updated successfully, but these errors were encountered: