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

Colocated routes should not include route module filename in route id to match v2 convention #128

Open
kiliman opened this issue May 28, 2024 Discussed in #126 · 3 comments

Comments

@kiliman
Copy link
Owner

kiliman commented May 28, 2024

Discussed in #126

Originally posted by akomm May 28, 2024
Before I open it in issue, maybe doc confusion again :)

It appears that the route IDs have been altered some. I find frequently a /route suffix at the end of the ID.
Its not a frequent thing to use the ID of the routes, but there is one official in remix that is documented, that being useRouteLoaderData(). But there are other use-cases to, I have one and had to adjust code to remove the suffix.

People who use this would have code breakage after adjusting the flat-routes to nested flat-routes because IDs of their routes changed.
I have adjusted my code to remove the suffix, but wanted to point out that you might have overlooked it.

@akomm
Copy link

akomm commented May 30, 2024

I've realized there is more incompatibility:

To maintain the ID also any +/ in the ID needs to be ..

I wonder if all that is even possible considering that the methods can be mixed and not all of them are said to be BC to the current remix v2 system - AFAIK just the nested flat routes?

By possible I mean preserving the ID uniqueness.

@kiliman
Copy link
Owner Author

kiliman commented May 30, 2024

Well, considering the + is a hybrid routing convention, I'm not sure it's a compatibility issue. Perhaps I'll add an option to strip + from route ids.

@akomm
Copy link

akomm commented May 30, 2024

Oh its part of the hybrid, then nvm.

It was a bit unclear to me that its hybrid, I thought its an extension to the flat-routes

The title confused me, thought its separate from hybrid, but the prompt actually has hybrid in the path name:
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants