Skip to content

refactor: simplify prop usage in Vue components #15

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

Merged

Conversation

oketafred
Copy link
Contributor

The Vue 3 documentation recommends not accessing props via props.propName in the template when using <script setup>. Instead, you can directly use the prop name in the template.

No breaking changes are introduced as the functionality remains the same.

This change removes unnecessary `props` destructuring in Vue components and directly uses the props where applicable. This improves code readability and consistency across the codebase. No breaking changes are introduced as the functionality remains the same.
@tnylea
Copy link
Contributor

tnylea commented Feb 24, 2025

Thanks @oketafred. Good to know. I'll test it out right now and if everything looks good. I'll approve the PR 👍

@taylorotwell taylorotwell merged commit ef2c4c8 into laravel:main Feb 24, 2025
2 checks passed
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.

3 participants