T3 for SSG

Does anyone have an example project of a T3 App using SSG? Reading the docs, i am not sure if i should add the SSG Helper context (https://trpc.io/docs/v10/ssg-helpers) somewhere in where the TRPC Settings are defined and have them be imported directly from utils/trpc.
SSG Helpers | tRPC
createProxySSGHelpers provides you a set of helper functions that you can use to prefetch queries on the server.
10 Replies
Johnson
Johnson•2y ago
https://github.com/vothvovo/nextjsdebug I made this a while back because I had a misunderstanding of what SSG actually is, but it's got a working ssg example in there
GitHub
GitHub - vothvovo/nextjsdebug: oof
oof. Contribute to vothvovo/nextjsdebug development by creating an account on GitHub.
Johnson
Johnson•2y ago
you also linked the v10 docs, make sure you have the right version, these are the v9 docs: https://trpc.io/docs/v9/ssg-helpers
SSG Helpers | tRPC
createSSGHelpers provides you a set of helper functions that you can use to prefetch queries on the server.
Johnson
Johnson•2y ago
also if you find out what exactly prefetch does please tell me lol
barry
barry•2y ago
you should use v10 not v9
Johnson
Johnson•2y ago
I honestly don't know the difference, but I guess choosing the highest version can't be wrong
barry
barry•2y ago
v10 is the latest stable version also nicer to use
Johnson
Johnson•2y ago
Well shiat, the example I gave was made in v9 Maybe he can migrate it or someone has an example with v10
barry
barry•2y ago
it's quite similar its just .prefetch now
Johnson
Johnson•2y ago
Talking about prefetch Do you know 🥺
barry
barry•2y ago
oh no just ask alex my immediate thought is just that it runs on the server lol and passes it along to you like not that complicated the complicated part of it is probably just making trpc on the client side get the data, rather than how you get it
Want results from more Discord servers?
Add your server