TanStackT
TanStack8mo ago
5 replies
technological-jade

Best way to get path slug in createServerFn?

I have a server function that needs to get the projectId from my path
/dashboard/project/1

At the moment I am using react-query and I am getting the projectId from the cliente with useParams and passing the id as a data parameter to the server function. But I would like to know if there is a better way.
Was this page helpful?