kelbs

    kelbs

    5 months ago
    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

    rp

    5 months ago
    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
    kelbs

    kelbs

    5 months ago
    Thanks! So besides the first call is it checking for a cookie or something?
    r

    rp

    5 months ago
    Yes. Exactly