Closed cayblood closed 10 months ago
Try changing your action signature to type the arguments instead of the function. The ActionFunction
type messes with inference because it forces TS to use Response
as the return type.
import { type DataFunctionArgs } from '@remix-run/node'
export const action = async ({ request, params }: DataFunctionArgs) => {
//...
}
Thanks. That worked!
I had an action like this:
And in my component I have:
This used to infer the type just fine. Now I get a typescript error:
Any ideas why?