Tool to track general query progress for axios, based on interceptors
JavaScript
use-axios-progress-bar react hook
yarn add use-axios-progress-bar or npm i use-axios-progress-bar --save
Find the progress bar component of your dream
Use it
importuseAxiosProgressBarfrom"use-axios-progress-bar";constGlobalProgressBar=()=>{constcurrentProgress=useAxiosProgressBar();/* -1: no activity 0: smth is running, but exact loading/total ratio cannot be calculated 1-100: smth is running and loading/total ratio is known */return(<div>Current state: ${currentProgress}</div>);}