
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-fetch-loading
Advanced tools
A simple loading component using HOC for fetching data from server.
This package provides a single enhanced react component, which used for injecting loading component to a component using React HOC (Higher Order Component).
Using npm:
npm install --save react-fetch-loading
Using yarn:
yarn add react-fetch-loading
Using ES5:
var loadingInjector = require('react-fetch-loading');
Using ES6:
import loadingInjector from 'react-fetch-loading';
The enhanced component only need one prop, which is a boolean for letting the enhanced component to know the fetching state, is it still fetching or done.
You can composing loadingInjector using another library like lodash or ramda.
let EnhancedComponent = compose(
fetchingDataHOC(url),
loadingInjector('isFetching'),
)(ComponentThatNeedsLoadingIndicator);
or if you want to use stand-alone loadingInjector, you can simply wrap your presentational/stateless component using loadingInjector.
let EnhacedComponent = loadingInjector('isFetching')(ComponentThatNeedsLoadingIndicator);
let EnhancedComponent = connect(mapStateToProps)(loadingInjector('isFetching')(ComponentThatNeedsLoadingIndicator);
Then you can exporting the component simply by:
export default EnhancedComponent;
Currently, we only have one indicator to show. Which is coming from material-ui circular progress. We'll provide more loading indicator soon!

FAQs
A simple loading component using HOC for fetching data from server.
We found that react-fetch-loading demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.