DEV Community


Posted on

A good progress bar package

A neat js progress bar package:

For an example of use with VueJS and axios interceptors see Note: this is a part of a paid course.

It uses axios interceptors as a middleware for invoking the loading bar e.g:

import axios from 'axios'
import NProgress from 'nprogress' // <--- Import the library

    const apiClient = axios.create({ ... })

    apiClient.interceptors.request.use(config => { // Called on request
      return config
    apiClient.interceptors.response.use(response => { // Called on response
      return response
Enter fullscreen mode Exit fullscreen mode

Top comments (0)