🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering.
8.32k
stars
670
forks
source link
Getting type error when passing FormData as a param in createServerFn validator, handler or middleware #2832
Closed
ricardoraposo closed 1 week ago
Which project does this relate to?
Router
Describe the bug
Receiving type error when passing FormData as param of a server function, as shown in the "Server Functions" docs page after "Getting Started"
Your Example Website or App
No link
Steps to Reproduce the Bug or Issue
As shown in the docs page, below: https://tanstack.com/router/latest/docs/framework/react/start/server-functions
Create a server function using createServerFn(), call one of the available methods ("validator", "handler", "middleware")
Expected behavior
FormData should not throw an error, as it can be sent in a POST request because it can be parsed when sent as a multipart/form-data request
Screenshots or Videos
Platform
Additional context
No response