Skip to content

Comments

docs: clearer variable name in x-bind example#4742

Merged
calebporzio merged 1 commit intomainfrom
pr-4430-clearer-bind-example
Feb 9, 2026
Merged

docs: clearer variable name in x-bind example#4742
calebporzio merged 1 commit intomainfrom
pr-4430-clearer-bind-example

Conversation

@calebporzio
Copy link
Collaborator

Closes #4430

Cherry-picked from #4430 by @sa- with review fix applied (camelCase instead of snake_case).

Summary

  • Renames placeholder to placeholderText in the x-bind docs example to avoid confusion between the JS variable name and the HTML placeholder attribute
  • Uses camelCase (placeholderText) instead of the original PR's snake_case (placeholder_text) to match JavaScript conventions used throughout Alpine's docs

Original description (from @sa-)

While I was reading through the docs I was quite confused because placeholder was both a variable name and an attribute for the input field. It took me unreasonably long to figure it out and I believe changing the variable name slightly would have helped me grok it faster.

Rename `placeholder` to `placeholderText` in the x-bind docs example
so the variable name doesn't collide with the HTML placeholder attribute.

Cherry-picked from #4430 by @sa- with camelCase fix applied.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@calebporzio calebporzio merged commit 4e99f08 into main Feb 9, 2026
2 checks passed
@calebporzio calebporzio deleted the pr-4430-clearer-bind-example branch February 9, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant