Courses

Vue.js 3 + Laravel 11 + Vite: SPA CRUD

Processing Form: Loading Indicator

Summary of this lesson:
- Adding loading indicators during form submission
- Implementing button disable states
- Managing loading states in composables
- Handling form submission timeouts

If the form takes longer to submit, then we need to show some kind of loading indicator and disable the submit button so the user wouldn't hit it twice.

loading indicator


It's pretty easy to achieve. In the posts Composable, we need a variable isLoading which will be true or false. When the button is clicked we just set it as true.

Also, we will reset the validation errors from the previous lesson. And if there are any errors, we need to set isLoading to false so that we could...

The full lesson is only for Premium Members.
Want to access all 27 lessons of this course? (115 min read)

You also get:

  • 69 courses (majority in latest Laravel 11)
  • Premium tutorials
  • Access to repositories
  • Private Discord