Extend or duplicate generate SSG helper functions?

Hello! In the T3 0 to prod video, Theo creates a function to generate an SSG helper.
export const generateSSGHelper = () => createServerSideHelpers({
router: appRouter,
ctx: { prisma, userId: "" },
transformer: superjson,
});
export const generateSSGHelper = () => createServerSideHelpers({
router: appRouter,
ctx: { prisma, userId: "" },
transformer: superjson,
});
If you want to use a similar concept for other types of data as well (not just userId), is it best to add more fields to ctx or to create brand new functions? Are there any specific best practices for SSG helpers in general?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server