Skip to content

Instantly share code, notes, and snippets.

@joshcirre
Last active December 11, 2023 13:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshcirre/e7cc53936463637842ec6ec7fe8eb487 to your computer and use it in GitHub Desktop.
Save joshcirre/e7cc53936463637842ec6ec7fe8eb487 to your computer and use it in GitHub Desktop.
// In Laravel app.js
import NProgress from 'nprogress';
Livewire.hook('commit', ({ component, commit, respond, succeed, fail }) => {
NProgress.start()
succeed(({ spanshot, effect }) => {
queueMicrotask(() => {
NProgress.done(true)
NProgress.remove()
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment