Skip to content
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

type { UIMatch } from '@remix-run/router' is different from type { UIMatch } from '@remix-run/react' #7438

Closed
1 task done
lensbart opened this issue Sep 15, 2023 · 7 comments · Fixed by #7464
Closed
1 task done
Labels
bug Something isn't working feat:typescript

Comments

@lensbart
Copy link
Contributor

What version of Remix are you using?

2.0.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

Compare both exports and observe that they are different:

  • UIMatch from @remix-run/router takes two type arguments
  • UIMatch from @remix-run/react takes one type argument

Probably the former should be used in both cases, since it’s more flexible.

Expected Behavior

Both types are the same

Actual Behavior

!(both types are the same)

@lensbart
Copy link
Contributor Author

Additionally, it would be nice if other exported types (e.g. LoaderFunction) would be exported from just one Remix package (i.e., not from both @remix-run/node and @remix-run/router), if that makes sense.

@brophdawg11 brophdawg11 self-assigned this Sep 18, 2023
@brophdawg11 brophdawg11 added bug Something isn't working feat:typescript and removed bug:unverified labels Sep 18, 2023
@brophdawg11
Copy link
Contributor

It would be nice if other exported types (e.g. LoaderFunction) would be exported from just one Remix package

Only exporting from one package would make the layered approach of building Remix on top of React Router impossible. @remix-run/router should be considered an implementation dependency so generally speaking you shouldn't be importing anything from there and shouldn't need it in your package.json. If there are aspects you need in your application that are not exposed through something like @remix-run/react or @remix-run/node then please file a separate issue for those and we can see if something should be re-exported through a Remix-specific package.

@lensbart
Copy link
Contributor Author

lensbart commented Sep 18, 2023

@brophdawg11 nice — thanks for that suggestion. The UIMatch mismatch mentioned above is the only reason I currently have the @remix-run/router dependency installed.

@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label Sep 18, 2023
@brophdawg11
Copy link
Contributor

This is resolved by #7464 and will be available in the next release 👍

@brophdawg11 brophdawg11 removed their assignment Sep 18, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-fccadba-20230919 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 2.0.1-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 2.0.1 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat:typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants