hellyeah
hellyeah
TTCTheo's Typesafe Cult
Created by hellyeah on 7/18/2024 in #questions
Next.js caching
Hey guys, I'm having a hard time understading what is wrong here. I made a simple repo: https://github.com/HellYeahOmg/revalidate-test Main page has a get request for some items, the second page has a form to add items. After submitting the form i expect to see the updated result on the main page. I added every disabling cache option i could, but it still doesnt work unless i hit router.request() or revalidatePath(). Why so?
12 replies
TTCTheo's Typesafe Cult
Created by hellyeah on 4/25/2024 in #questions
Next.js as a client API choice
Having watched all theo's videos regarding next and APIs (mainly tRPC and server actions), i got the grasp of understanding of the stack and the decisions if a full-stack app should be built. However, let's imagine that there's a need of using next.js purely as a client solution, meaning there's already some api (be it graphql or rest) with other clients like mobile etc. What should be done in this case? As far as I understand, all the featurse like server actions with blazingly fast revalidation (revalidePath) or tRPC won't work. Should RSC be used in this case with simple fetch calls to the api, or it will be better to use next.js api as BFF with tRPC/server actions?
12 replies