
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-redux-progress
Advanced tools
Progress bar for React applications

Using npm:
$ npm install --save react-redux-progress
Using yarn:
$ yarn add react-redux-progress
Using pnpm:
$ pnpm install react-redux-progress
// using ES6 modules
import { useProgress } from 'react-redux-progress';
// using CommonJS modules
var { useProgress } = require('react-redux-progress');
The UMD build is also available on unpkg:
<script src="https://unpkg.com/react-redux-progress/umd/react-redux-progress.min.js"></script>
You can find the library on window.ReactReduxProgress.
import { useProgress } from 'react-redux-progress';
// give percent any shape you want
const MyProgress = ({ isActive }) => {
const percent = useProgress(isActive);
return <div>{`${percent}%`}</div>;
};
import { ProgressBarProvider } from 'react-redux-progress/ProgressBarProvider';
// default color is #77b6ff
const Layout = ({ isProgressActive, children }) => (
<div>
<ProgressBarProvider isActive={isProgressActive} color="#db7093" />
{children}
</div>
);
You can store isProgressActive variable in redux store and control it with your actions
import { combineReducers } from 'redux';
import { progress } from 'react-redux-progress/reducer'
const rootReducers = combineReducers({
progress,
// other reducers
});
export default rootReducers;
Get progress status
import { useSelector } from 'react-redux';
import { ProgressBarProvider } from 'react-redux-progress/ProgressBarProvider';
const Layout = ({ isProgressActive, children }) => {
const isProgressActive = useSelector(state => state.progress.isActive);
return (
<div>
<ProgressBarProvider isActive={isProgressActive} />
{children}
</div>
);
};
Async action
const startAction = (progressId) => ({
type: 'START_ASYNC_ACTION', // your action name
progressId,
});
const stopAction = (progressId) => ({
type: 'STOP_ASYNC_ACTION', // your action name
progressId,
});
// dispatch thunk action
export function startAsyncAction() {
return dispatch => {
const progressId = 'unique-string';
dispatch(startAction(progressId));
setTimeout(() => {
dispatch(stopAction(progressId));
}, 3000);
};
}
| Property | Type | Required? | Default | Description |
|---|---|---|---|---|
| maxPercent | Integer | 85 | Progress stop point | |
| intervalTime | Integer | 450 | Update interval milliseconds | |
| increment | Function | Default incrementor (based on random) |
Checkout examples/real-world for more
| Property | Type | Required? | Default | Description |
|---|---|---|---|---|
| isActive | Boolean | ✓ | Progress activation flag | |
| color | String | #77b6ff | Custom color for progress bar percent | |
| className | String | Optional custom CSS class name to attach to root Percent element. | ||
| styles | Object | Optional custom CSS styles to attach to root Percent element. | ||
| absolute | Boolean | false | Position property for Percent |
Use GitHub issues for requests.
I actively welcome pull requests; learn how to contribute.
$ pnpm test
FAQs
Progress bar for React and Redux applications
The npm package react-redux-progress receives a total of 41 weekly downloads. As such, react-redux-progress popularity was classified as not popular.
We found that react-redux-progress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.