#I get an unwanted behavioour using

1 messages ยท Page 1 of 1 (latest)

green coral
gray garnetBOT
#

Hi @green coral. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

green coral
#

for anyone coming accross this post: the problem was the following directive that I oversaw:
const dynamic = "force-static"

gray garnetBOT
#

Sorry @green coral, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:

Perhaps try again in 15mins?

hardy crest
#

don't force-static... that would mean caching your component at build-time

#

which meant getServerSession() would only works at first-time visit as the page will be build for the first time.....

green coral
#

yeah I had it in a few pages by accident since I copied the page code over from a page where I needed that. Just scrolled down and saw it ๐Ÿ˜…

hardy crest
#

well, im glad you figured it out ๐Ÿ˜…

green coral
#

me2

#

saving some more client side js since I can convert a few to server components ๐Ÿค“