TanStackT
TanStack4mo ago
5 replies
wispy-yellow

createStartHandler — breaking change in RC?

Hi!

It looked like the signature of createStartHandler was changed in the RC released.

Previously it was
export function createStartHandler<TRouter extends AnyRouter>({
  createRouter,
}: {
  createRouter: () => Awaitable<TRouter>
}): CustomizeStartHandler<TRouter> {


Now it is
export function createStartHandler<TRegister = Register>(
  cb: HandlerCallback<AnyRouter>,
): RequestHandler<TRegister> {


I think the change is missing from the RC migration guide (cc @Manuel Schiller).

The context of my issue is that I’m trying to migrate an app that uses Clerk (https://clerk.com/docs/quickstarts/tanstack-react-start#add-create-clerk-handler) and I need createStartHandler to create the Clerk handler. What am I supposed to use instead? createStartHandler(getRouter) doesn’t typecheck
Learn how to use Clerk to quickly and easily add secure authentication and user management to your TanStack React Start application.
TanStack React Start: TanStack React Start Quickstart (beta)
Was this page helpful?