Closed brandonpittman closed 1 year ago
If you have an optional Remix route, a type error occurs when supplying the dynamic segments object.
https://stackblitz.com/edit/node-jcqyxc?file=app/routes.d.ts
route("/reports/:type?/:id/", {id: userId})
?
I should be able to use an optional route and be able to optionally pass the optional param.
No response
This is now released under routes-gen@0.6.0 (https://github.com/sandulat/routes-gen/pull/32). Thank you so much @brandonpittman!
routes-gen@0.6.0
Describe the bug
If you have an optional Remix route, a type error occurs when supplying the dynamic segments object.
Your Example Website or App
https://stackblitz.com/edit/node-jcqyxc?file=app/routes.d.ts
Steps to Reproduce the Bug or Issue
route("/reports/:type?/:id/", {id: userId})
?
from the optional route as part of the param's name, not its type definition.Expected behavior
I should be able to use an optional route and be able to optionally pass the optional param.
Screenshots or Videos
Platform
Additional context
No response