useResponse
The response calls of the current request.
The response calls of the current request.
Import#
ts
import { useResponse } from "@shadow-js/dusk";
Signature#
ts
function useResponse(): ResponseHandle
Returns#
The calls. On the client, or outside a request, every call does nothing (invalid arguments still throw).
Examples#
ts
export function Page() {
useResponse().setHeader("cache-control", "private, no-store");
return <p>private</p>;
}