Skip to content
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

Feature Request: type-safe routes #65

Closed
tconroy opened this issue May 28, 2024 · 2 comments
Closed

Feature Request: type-safe routes #65

tconroy opened this issue May 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@tconroy
Copy link

tconroy commented May 28, 2024

Is your feature request related to a problem? Please describe.
Many complex webapps have a need for type-safety at the route level. It'd be great if Orbitkit offered a solution for type-safe routing.

Describe the solution you'd like
There's a few off-the-shelf packages that could be incorporated to Orbitkit to solve this: nextjs-routes is one I am aware of: https://github.com/tatethurston/nextjs-routes

Describe alternatives you've considered
Alternative could be to roll your own typesafe routing solution, but that's probably out of scope for this project.

Additional context
Would likely want something compatible with both app and pages based routes.

There is the nextjs.config.ts experimental typed routes that we could explore.

@ixahmedxi
Copy link
Owner

typed routes don't work with --turbo for dev, which makes it out of the choices.

There are many custom built solutions out there, as well as 3rd party packages that enable this feature. However, most of them rely on some sort of a build step to achieve this type-safety, it needs a bit of digging but should be something that we can add to orbitkit.

@ixahmedxi ixahmedxi added the enhancement New feature or request label Jun 9, 2024
@ixahmedxi
Copy link
Owner

This has been added already now, I have chosen to go with typed routes instead of turbo for dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants