Ankan
Ankan
TTCTheo's Typesafe Cult
Created by Ankan on 10/2/2023 in #questions
NextJS Onload Function
I was trying to check whether an user has an auth token in cookies on load. And if it is there I was passing down that token to a client component to change client auth state as it was required to perform some other UX based things. Now, in my approach I was doing it in layout.tsx but when built the app it showed now everypage is by default using server side rendering. So, my question is there a better way to this above mentioned stuff like moving it into some other component and just making the pages statically render reducing the server cost. Or is it the only way to do this stuff and if so is there any performance hits that I would face or any cost related hits in production. Also if there is a better way to do this please mention? Thanks in advance.
2 replies
TTCTheo's Typesafe Cult
Created by Ankan on 8/11/2023 in #questions
Planetscale UUID
Can anybody suggest how to use uuid as primary key in planetscale with drizzle orm?
38 replies