Skip to content
Discussion options

You must be logged in to vote

The json functions returns a Response object, and aside of data you can pass a ResponseInit as second argument to customize the status code and headers.

When you don’t return a Response from the loader or action, Remix will pass your value to the json function and create the response for you.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@lili21
Comment options

@kiliman
Comment options

Answer selected by lili21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants