diff --git a/packages/remix-server-runtime/responses.ts b/packages/remix-server-runtime/responses.ts index 57b13d7e680..424b4296aaa 100644 --- a/packages/remix-server-runtime/responses.ts +++ b/packages/remix-server-runtime/responses.ts @@ -41,6 +41,11 @@ export type TypedResponse = Omit & { * This is a shortcut for creating `application/json` responses. Converts `data` * to JSON and sets the `Content-Type` header. * + * @deprecated This utility is deprecated in favor of opting into Single Fetch + * via `future.v3_singleFetch` and returning raw objects. This method will be + * removed in React Router v7. If you need to return a JSON Response, you can + * use `Response.json()`. + * * @see https://remix.run/utils/json */ export const json: JsonFunction = (data, init = {}) => { @@ -50,6 +55,10 @@ export const json: JsonFunction = (data, init = {}) => { /** * This is a shortcut for creating Remix deferred responses * + * @deprecated This utility is deprecated in favor of opting into Single Fetch + * via `future.v3_singleFetch` and returning raw objects. This method will be + * removed in React Router v7. + * * @see https://remix.run/utils/defer */ export const defer: DeferFunction = (data, init = {}) => {