in what scenerio would server action cause whole route to be revalidated without explicit request?
Answered
Yellow croaker posted this in #help-forum
Yellow croakerOP
Asking this because I'm not sure why it knows to fetch latest values on parent server component after I submit changes. I havenot put revalidatepath/tag or router.refresh.
using onSubmit in form with server actions + preventDefault()
using onSubmit in form with server actions + preventDefault()
7 Replies
@Yellow croaker Asking this because I'm not sure why it knows to fetch latest values on parent server component after I submit changes. I havenot put revalidatepath/tag or router.refresh.
using onSubmit in form with server actions + preventDefault()
Double-striped Thick-knee
are you assigning cookies from server action?
Yellow croakerOP
its possible , im using getSession() from auth0 library.
Double-striped Thick-knee
it does refresh the site when cookies are set.
Double-striped Thick-knee
Answer
@Double-striped Thick-knee <@245738645305163776> you can take a look at this
https://github.com/vercel/next.js/issues/50163
Yellow croakerOP
appreciate this.
-now i'm trying to figure how to see if theres a refresh log on dev tools.
-gonna check auth0 docs if they do mess with cookies.
and this refresh would only be client side right , not a revalidate of any kind.
anyway i'll read that !
-now i'm trying to figure how to see if theres a refresh log on dev tools.
-gonna check auth0 docs if they do mess with cookies.
and this refresh would only be client side right , not a revalidate of any kind.
anyway i'll read that !
yea last comment mentioned of getSession .
@Yellow croaker appreciate this.
-now i'm trying to figure how to see if theres a refresh log on dev tools.
-gonna check auth0 docs if they do mess with cookies.
and this refresh would only be client side right , not a revalidate of any kind.
anyway i'll read that !
Double-striped Thick-knee
You could use api routes if you don't want the refresh