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

UIMatch still has issues #7518

Closed
1 task done
lifeiscontent opened this issue Sep 22, 2023 · 7 comments · Fixed by #7551
Closed
1 task done

UIMatch still has issues #7518

lifeiscontent opened this issue Sep 22, 2023 · 7 comments · Fixed by #7551
Labels
bug Something isn't working renderer:react

Comments

@lensbart
Copy link
Contributor

lensbart commented Sep 22, 2023

See also here

@ngbrown
Copy link
Contributor

ngbrown commented Sep 25, 2023

I will say that having different UIMatch exported from two different packages is confusing.

I have to use import type { UIMatch as UIMatchRR } from "@remix-run/router"; on functions that dealing with the return from useMatches().

I then use import type { UIMatch } from "@remix-run/react"; in the actual routes so I can get the UIMatch<typeof loader> functionality.

I have a file that imports both, thus the as in the import. I think it would be better to have two different type names from the beginning, or just make us do our own SerializeFrom<typeof loader>.

@brophdawg11
Copy link
Contributor

I will say that having different UIMatch exported from two different packages is confusing.

This is a requirement because UIMatch.data is serialized over the network in Remix, but not in RR - so we need the types to reflect that.

@brophdawg11
Copy link
Contributor

@lensbart Thanks for the repro - this looks like a quick fix - we are accidentally exporting the RR version of useMatches from @remix-run/react instead of the Remix wrapper. I'll get a PR up to fix this 👍

@brophdawg11 brophdawg11 added bug Something isn't working renderer:react and removed bug:unverified labels Sep 27, 2023
@brophdawg11 brophdawg11 self-assigned this Sep 27, 2023
@brophdawg11 brophdawg11 linked a pull request Sep 27, 2023 that will close this issue
@brophdawg11
Copy link
Contributor

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

@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label Sep 27, 2023
@brophdawg11 brophdawg11 removed their assignment Sep 27, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 2.1.0-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.1.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!

@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 renderer:react
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants