-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add package @7nohe/adonis-typed-links #114
Conversation
Hey, thanks for the PR Why not using Tuyau and specifically @tuyau/inertia? I see that your What do you think? |
I agree with your thoughts and would like to contribute to Tuyau when I get the chance. |
If you're unfamiliar with the codebase: I would be happy to help! Feel free to reach out to me on Discord or open an issue on the repo, and I will try my best to help. https://github.com/Julien-R44/tuyau/blob/main/packages/inertia/src/react/index.tsx I think adding a Since Tuyau also generates the Input/Output types for each controller/endpoint, it would be entirely possible to have a // Pass the route name ( or maybe an url ) to the `useForm`
const form = useForm('posts.comment', {
// And thanks to Tuyau codegen, we are able to detect WHAT data should be sent to this endpoint.
// Here, username is not a property accepted by our endpoint. So Typescript should yell at us
username: '',
}) See what I mean? |
I see, the input and output type generation is excellent! |
I want to proceed with adding this package’s features to Tuyau, so I’ll close this PR for now. |
Provides strongly-typed wrappers for Inertia.js's Links, Manual Visits, and Form Helper from AdonisJS routing