Sithu Khant
Sithu Khant4w ago

react router v7 framework and trpc

How can I use trpc inside react router v7 framework project?
13 Replies
Sithu Khant
Sithu KhantOP4w ago
hey, can we talk here? @!wild_duck 🦆🤍🚶
Sithu Khant
Sithu KhantOP4w ago
btw, thank you for helping me, it is still giving me headaches!
!wild_duck 🦆🤍🚶
routes.ts for what that's for the client or the back ?
Sithu Khant
Sithu KhantOP4w ago
I mean in the react router v7 as framework, there is a file called routes.ts for routing.
!wild_duck 🦆🤍🚶
yes what's about it
Sithu Khant
Sithu KhantOP4w ago
like this:
import { type RouteConfig, index } from "@react-router/dev/routes";
import { route } from "@react-router/dev/routes";

export default [
index("routes/home.tsx"),
route("subscriptions", "routes/subscriptions.tsx"),
] satisfies RouteConfig;
import { type RouteConfig, index } from "@react-router/dev/routes";
import { route } from "@react-router/dev/routes";

export default [
index("routes/home.tsx"),
route("subscriptions", "routes/subscriptions.tsx"),
] satisfies RouteConfig;
!wild_duck 🦆🤍🚶
it's for the type safty
Sithu Khant
Sithu KhantOP4w ago
How can I add trpc routes to that? I don't need?
!wild_duck 🦆🤍🚶
do not can you get to the call https://discord.gg/5RE4wUyd
Sithu Khant
Sithu KhantOP4w ago
I can't dm you
!wild_duck 🦆🤍🚶
add me as friend
Sithu Khant
Sithu KhantOP4w ago
done

Did you find this page helpful?