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

Transition Inertia Vue stubs to <script setup> syntax #127

Merged
merged 4 commits into from
Feb 9, 2022

Conversation

jessarcher
Copy link
Member

This PR transitions the Inertia Vue 3 stubs to use Vue's <script setup> syntax.

The official Vue docs recommend using the <script setup> syntax when using the Composition API with Single File Components as it reduces boilerplate and increases performance. It also significantly improves working with TypeScript, for users who may wish to convert their Breeze installation.

The PR also moves the <script setup> section to the top of the single file components to be consistent with the Vue docs and Evan's recommendations.

Note that the semicolons in the current code were applied inconsistently so I have also added them where appropriate. The Vue docs don't use semicolons, however the StyleCI JS and Vue rules require them by default.

I have tested this PR in a new Laravel Breeze installation by viewing every page component and following every action (register, login, verify email, forgot password, password reset, logout) happy and sad path. I would love for someone else to also double check this.

@taylorotwell taylorotwell merged commit 9680289 into laravel:1.x Feb 9, 2022
@taylorotwell
Copy link
Member

Thanks!

@mehranny
Copy link

This causing an error for me: Uncaught ReferenceError: defineProps is not defined
at eval (Button.vue?3794:2:1)

slimani-dev pushed a commit to slimani-dev/breeze that referenced this pull request Jan 21, 2023
* Transition to <script setup>

* update inertia version

* Fix autofocus of Input component

* use value property

Co-authored-by: Taylor Otwell <taylor@laravel.com>
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