Docs: Suggest camelCase in Vue useForm examples #2431
Closed
niels-numbers
started this conversation in
Ideas
Replies: 1 comment
-
I realized its good as it is, since
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
I’d like to propose updating the official Inertia.js documentation to use camelCase in Vue form examples, instead of snake_case.
Right now, most examples show:
However, when passing props from Laravel to Vue, Inertia automatically converts snake_case keys to camelCase, so we end up writing:
This inconsistency causes real-world issues when reusing data.
Example use case:
snake_case
fields.This is especially problematic when forms are used for both creating and editing models.
Since camelCase is the standard in Vue and JavaScript, and Inertia already converts to camelCase, I think it would improve clarity and consistency if the docs reflected this by using camelCase in useForm() examples.
Happy to discuss further — and thanks for an awesome project! 🙌
Beta Was this translation helpful? Give feedback.
All reactions