Does frontend function `doesSessionExist()` make a...
# general
k
Does frontend function
doesSessionExist()
make a network call? If we're building our own frontend UI, how is doesSessionExist() intended to be used? Should I be calling it in every frontend component that needs to know if a session exists? Should I call it and then instead cache the result?
r
hey @User it makes a network call only once when a new visitor visits your site, or if you manually clear all the cookies. You can safely call it each time a component mounts (in
useEffect
and it should be fine)
You do not need to cache anything
k
Thanks! So besides the first call is it checking for a cookie or something?
r
Yes. Exactly