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
feat: improve the Await props generics #10498
base: main
Are you sure you want to change the base?
feat: improve the Await props generics #10498
Conversation
|
Hi @GiveMe-A-Name, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
Thank you so much! Lots of types can be synced between remix and react-router. I’ll do some more. |
Thank you for your reply. Is there any other MR to improve it? |
what's an MR? 😆 We need to make |
Sorry, My fault. That means PR. In GitHub we called it PR(Pull Request) and in GitLab we called it MR(Merged Request). 😂 As your said, you will do some more work for this problem. Is means it will have an other PR to resolve it? |
Im working on it right now but it's much trickier than I first envisioned! It's all very intertwined: add a generic in one place and it errors out in 10 files. Feel free to implement it yourself too, as I’m finding it difficult to find the time to tackle all the type issues after work hours xd |
Well, maybe I could also give it a try. This is not a serious problem for the developer. |
I just wanted to drop in here and say that in many cases we've specifically avoided adding the generics in React Router that we have in Remix (for things like So for now in RR, instead of Hopefully this'll all get much cleaner in the future. |
Now, when we use Await in
ts
project, thetype
will ignore because the define ofAwait
components.For examples:
It no good for developer developed in IDE.
we can improve the Await
Type System
by generics.