Allow customizing the template when creating new routes/
in tanstack start
#2392
nikitavoloboev
started this conversation in
Ideas
Replies: 1 comment
-
this can potentially be done with some templating language like this perhaps: import { createFileRoute } from "@tanstack/react-router"
function RouteComponent() {
return <></>
}
export const Route = createFileRoute($route-name)({
component: () => <RouteComponent />,
}) Or better yet as proposed by @schiller-manuel in Discord, have optional async function that gets the route path as string param and returns a string. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently tanstack start has this nice feature of creating template for new files in template:
CleanShot_2024-09-22_at_21.51.16.mp4.mov
However what I want is instead of this structure:
Is for this to get generated:
I prefer to keep my main route component separated so I can instantly start adding logic + edit the JSX and all the router level stuff is at the bottom.
I assume others would want different templates so this is a more of a feature request for allowing to create custom templates (if possible). Would be wonderful.♥️
Beta Was this translation helpful? Give feedback.
All reactions