Replies: 1 comment 5 replies
-
The reason is to prevent a breaking change. Since this is a future API that you opt in, they can't change the function signature directly. They make note of it here: However they could do something similar to
You can also create your own types that will override the existing ones. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been playing around with a new Remix app that has enabled the newly available (unstable) Single Fetch feature. One of the new paradigm shifts is that instead of returning a response, it's recommended to just return data and use the
response
object that comes into the parameters when you need to change the status code or add headers.I might be doing something wrong, but the types for
ActionFunction
andLoaderFunction
both haveresponse
beingResponseStub | undefined
. My understanding is that if I'm using "Single Fetch", theresponse
should always be there. Is there some utility types I should be using? Or is it enough to just doActionFunctionArgs & { response: ResponseStub }
?Beta Was this translation helpful? Give feedback.
All reactions