A React component that displays a progress bar automatically when fetch requests are active. Version 1.0.0 is the latest stable release. It wraps window.fetch to track active requests and shows a configurable progress bar only after 150ms delay, with a smooth 100% completion animation. Key differentiators: lightweight, no external dependencies besides React, simple override of global fetch, and customizable via style or CSS.
npm install react-fetch-progressbarNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize progressBarFetch, override window.fetch, and render the ProgressBar component with custom styling.
Ensure setOriginalFetch(window.fetch) is called before window.fetch = progressBarFetch.
Render only a single <ProgressBar /> globally.
Only customize style properties like backgroundColor, height, top, zIndex.
Ensure code runs in a browser environment; check for window before overriding.
Use named import: import { progressBarFetch } from 'react-fetch-progressbar'