tatethurston / nextjs-routes

Type safe routing for Next.js
MIT License
571 stars 23 forks source link

Incorrect Typing of Props for Link in next 13 #99

Closed litewarp closed 1 year ago

litewarp commented 1 year ago

In nextj 13, NextLink accepts anchor props. However, adding className to NextLink after installing nextjs-routes results in a type error. that className is not an acceptable prop.

image

next-themes v 1.0.1 node 18 next 13.0.4

tatethurston commented 1 year ago

@litewarp Thanks for reporting this. I've updated the types in 1.0.2.

erickriva commented 1 year ago

From version 13.0.2, Next has a experimental flag to have typed routes in app folder. In next.config.js, add experimental: { appDir: true, typedRoutes: true }

tatethurston commented 2 weeks ago

Now supported in 2.2.2