Replies: 3 comments 1 reply
-
@sandulat any updates on this? |
Beta Was this translation helpful? Give feedback.
-
what is the status of this topic, can we go with this example ? Usage: |
Beta Was this translation helpful? Give feedback.
-
@robyhuzwandar @IgnisDa I'm still not sure if this should belong to this package since it was not meant to be an universal tool to work with URLs, but rather add typings for your route list and their params only. It can be easily solved in multiple ways: `${route("/products")}?sort=asc` `${route("/products")}?${new URLSearchParams({ sort: 'asc' })}` IMHO there is literally no point in adding this to |
Beta Was this translation helpful? Give feedback.
-
It would be great if the
route
function allowed to optionally add query string parameters to the route.Example:
Usage:
route("/products", { sort: "asc" })
Output:
/products?sort=asc
Usage:
route("/products/:productId/comments", { productId: "123"}, { sort: "asc" })
Output:
/products/123/comments?sort=asc
.Beta Was this translation helpful? Give feedback.
All reactions