-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEXT-764] GET Route Handlers not valid destinations with experimental.typedRoutes #46742
Comments
This PR, I imagine? Maybe a line should be added to the top of the PR description with |
@karlhorky I'm asking for the members' reviews first, since I don't know whether Route Handlers are supposed to be used with |
@DuCanhGH Let's open a separate PR for this feature request as this one requires more complicated logic to implement and needs some discussion (typed routes doesn't support API routes and public files at all as of today, not a bug). |
I shared some of my thoughts here: #47185 (comment), but this does look like a valid use case... although |
Yea, ideally you should be able to use a custom route with a rewrite just as if it was a Next.js built-in page. So we should include those. |
Now that Next.js has support for linking to GET Route Handlers, we no longer need this patch Ref: vercel/next.js#46742 Ref: vercel/next.js#47185
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Middleware / Edge (API routes, runtime), Routing (next/router, next/navigation, next/link), TypeScript
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/trusting-rosalind-1mwkuc
To Reproduce
app/page.tsx
about thehref
location pointing at aGET
Route HandlerAssociated Route Handler:
app/set-cookie/route.ts
Describe the Bug
The
experimental.typedRoutes
configuration doesn't handle anhref
prop onnext/link
pointing at a location of aGET
Route Handlercc @DuCanhGH @shuding
Expected Behavior
An
href
location pointing at aGET
Route Handler worksWhich browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
From SyncLinear.com | NEXT-764
The text was updated successfully, but these errors were encountered: