Can a URL be formatted with dashes, such as "user-list" in the context of trpc?
Can a URL be formatted with dashes, such as "user-list" in the context of trpc?
I'd prefer not to write
router({'user-list'....
3 Replies
You should be able to do anything that a JS object will allow, though I'm not sure what unhandled corner cases you might be able to find if you abuse it (ie. using
.
in a procedure name)
It's probably best to stick with normal JS conventionsGitHub
feat: Automatic Conversion of tRPC Method Names from CamelCase to K...
Describe the feature you'd like to request This feature request proposes an enhancement to the tRPC framework to automatically convert method names from camelCase (e.g., pathUrl) to kebab-case ...
i don't see the value add of this feature request and I don't think we will want to spend time building and maintaining it if the motivation is only personal preference