Trailing underscore at params affect useParams
See original GitHub issueHi, I’m trying out remix-flat-routes
and when I use routes with trailing underscore at params, it affects the useParams
as well as params
in loader / action.
I have to resort to creating a getParam
abstraction but just wondering if there’s a good way to solve this within the library itself.
Just to clarify in case my description is not clear enough, for example, I have these routes:
/app/$organizationSlug.tsx
/app/$organizationSlug_/other.tsx` --> useParams() will return { organizationSlug_: "slug" }
Issue Analytics
- State:
- Created a year ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Trailing underscores in parameter names are dropped #519
When documenting Python parameters with trailing underscores: #!python def example(str_): """Notice that the parameter `str_` has a trailing underscore.
Read more >UseParams is refreshing but UseEffect is not working
When you switch from one user to another, the component won't remount so: const [user, setUser] = useState(location.state);.
Read more >useParams v6.6.1 | React Router
The useParams hook returns an object of key/value pairs of the dynamic params from the current URL that were matched by the <Route...
Read more >Spec API (pipeline.yaml) — ploomber 0.21.8dev documentation
The params section contains an optional section called resources_ (Note the trailing underscore). By default, Ploomber marks tasks as outdated when their ...
Read more >All Tesseract OCR options - Muthukrishnan
Name Default value Description
textord_debug_tabfind 0 Debug tab finding
textord_debug_bugs 0 Turn on output related to bugs in tab finding
textord_testregion_left ‑1 Left edge of debug...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the comments. I’d like to make a VS Code extension that will make it easier to create a flat route. This way you won’t have to type in the prefixes. It is easier to create routes in the original way, since you just have to create a new file inside the folder.
Other than that, I agree with you about the “pros”.
Awesome! Can confirm everything is working as expected. Appreciate it!