Server action invoked when Sanity Live receives a content-change message.
The argument is the list of cache tags derived from the Live Content API
event. The default action revalidates those tags. Return 'refresh' from a
custom action to also call router.refresh() in the browser.
There's three types of values you can give action:
'use server'; export async function action() {}
'use client'; export async function action() {}
'refresh'
If you give the string 'refresh', it's the same as if the action just async () => 'refresh', which leads to calling router.refresh() for you
Server action invoked when Sanity Live receives a content-change message.
The argument is the list of cache tags derived from the Live Content API event. The default action revalidates those tags. Return
'refresh'from a custom action to also callrouter.refresh()in the browser.There's three types of values you can give
action:If you give the string 'refresh', it's the same as if the action just calling
async () => 'refresh', which leads torouter.refresh()for you