Rename `params` to `slugs` in load
See original GitHub issueDescribe the problem
in load function we have instead of page now parameters url and params… params is derived from url.pathname, but url has also property url.searchParams… because of that it’s kind of confusing as “params” can now refer to both parameters like ?x=value
or to params like /[slug]/
… I even twice was burned on that I did “const params = url.searchParams” in load function and rewrited params object from params of load function. (see, a lot of params word in this sentence)…
Describe the proposed solution
let url be url, and params be named slugs
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Rename files during upload using variables
With this plugin you can construct paths from additional variables like: post title, ID, category, post author, post date and much more. How...
Read more >Laravel: Resource Controller change parameter from ID to Slug
For Resource Routing the route parameter is the resource name, first argument, in singular form. Route::resource('categories' ...
Read more >Django Slug Tutorial | LearnDjango.com
In this tutorial we will add slugs to a Django website. As noted in the official docs: "Slug is a newspaper term. A...
Read more >The useQuery hook - with variables | Lift-off III - Apollo GraphQL
Use the useQuery hook to send the GET_SPACECAT query to the server. It takes a spaceCatId as a variable. Destructure the loading ,...
Read more >wp_update_term() | Function - WordPress Developer Resources
Parameters · alias_of string. Slug of the term to make this term an alias of. Default empty string. Accepts a term slug. ·...
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 Free
Top 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
Unless we can find a name that’s unambiguously better than
params
, I think we probably need to keep it as-is. It was chosen because it matchesreq.params
in Express apps, and is also used by Nuxt……and Remix:
It shouldn’t be the overriding consideration, but there’s value in using the same terminology as the wider ecosystem.
Yeah, my thought process behind
sections
was that they are literal sections of the url.example.com/<section>/<section>
, etc.