Install using bunx shadcn@latest add @remix-utils/responses.
Note
Install using bunx shadcn@latest add @remix-utils/redirect-back.
This function is a wrapper of the redirect helper from Remix. Unlike Remix's version, this one receives the whole request object as the first value and an object with the response init and a fallback URL.
The response created with this function will have the Location header pointing to the Referer header from the request, or if not available, the fallback URL provided in the second argument.
Install using
bunx shadcn@latest add @remix-utils/responses.Install using
bunx shadcn@latest add @remix-utils/redirect-back.This function is a wrapper of the
redirecthelper from Remix. Unlike Remix's version, this one receives the whole request object as the first value and an object with the response init and a fallback URL.The response created with this function will have the
Locationheader pointing to theRefererheader from the request, or if not available, the fallback URL provided in the second argument.This helper is most useful when used in a generic action to send the user to the same URL it was before.
Install using
bunx shadcn@latest add @remix-utils/responses.Helper function to create a Not Modified (304) response without a body and any header.
Install using
bunx shadcn@latest add @remix-utils/responses.Helper function to create a JavaScript file response with any header.
This is useful to create JS files based on data inside a Resource Route.
Install using
bunx shadcn@latest add @remix-utils/responses.Helper function to create a CSS file response with any header.
This is useful to create CSS files based on data inside a Resource Route.
Install using
bunx shadcn@latest add @remix-utils/responses.Helper function to create a PDF file response with any header.
This is useful to create PDF files based on data inside a Resource Route.
Install using
bunx shadcn@latest add @remix-utils/responses.Helper function to create a HTML file response with any header.
This is useful to create HTML files based on data inside a Resource Route.
Install using
bunx shadcn@latest add @remix-utils/responses.Helper function to create a XML file response with any header.
This is useful to create XML files based on data inside a Resource Route.
Install using
bunx shadcn@latest add @remix-utils/responses.Helper function to create a TXT file response with any header.
This is useful to create TXT files based on data inside a Resource Route.
Author
Sergio XalambrÃ