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

Usage/documentation questions #41

Open
WesleyYue opened this issue Feb 7, 2023 · 1 comment
Open

Usage/documentation questions #41

WesleyYue opened this issue Feb 7, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@WesleyYue
Copy link

In the context of this, what do the following mean?

  • What does a underscore prefix on folders mean? Will it match literally to _folder on the URL path (ie it doesn't do anything special?)
  • What's the difference between users+ and project? Does the + mean anything if there is no underscore prefix? ie. they should always be used together to have special meaning?

The examples provided is a bit complex and confusing, these are the notes I have on what I deduced, is my understanding correct?

  • For folders:
    • _foldername+ means folder will be a layout. Folder name will not show up in URL path
    • $foldername means foldername will be captured by as a param ($userId/_route.tsx)
    • $/_route.tsx means complete wild card.
  • For files:
    • _filename.tsx prefix for anything means it’s a route file (this file will be rendered)
    • Anything else does not get rendered (helpful to organize files close to the layout/route where it is used)

It feels like the conventions here are way better than what is in the original discussion, but I can't be sure exactly what all the rules are. I think the readme could greatly benefit by removing the copy+paste from the original discussion, and just focus on providing one long example with the latest 0.5.1 conventions.

@kiliman
Copy link
Owner

kiliman commented Feb 8, 2023

Thanks for the feedback. I agree. I plan on rewriting the docs and giving more concrete examples of the different conventions.

I'm also considering moving to a new package, remix-hybrid-routes that moves away from the strict flat routes convention in v2. That way there will be no confusion.

I hope to get something out by the end of the week.

@mikkpokk mikkpokk added the documentation Improvements or additions to documentation label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants