Response HelpersjsonEdit this pageReturns JSON data from an action while also providing options for controlling revalidation of cache data on the route. /actions/get-completed-todos.tsimport { action, json } from "@solidjs/router";import { fetchTodo } from "../fetchers"; const getCompletedTodos = action(async () => { const completedTodos = await fetchTodo({ status: 'complete' }); return json(completedTodos, { revalidate: getTodo.keyFor(id) });}); Also read action and revalidate. Type Signature interface ResponseOptions { revalidate?: string | string[];} json<T>(data: T, opt?: ResponseOptions): CustomResponse<T>;Report an issue with this pagePrevious← useSearchParamsNextredirect →