
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@vlsergey/react-promise
Advanced tools
Simple ReactJS components for Promise calculation.
import { PromiseComponent } from "@vlsergey/react-promise";
/* ... */
const promise
return <PromiseComponent
fallback={<span>Calculating...</span>}
promise={ promise }>
{(data) => <span>Promise result: {JSON.stringify(data)}}</span>}
</PromiseComponent>;
import { PromisesComponent } from "@vlsergey/react-promise";
/* ... */
const multiplePromises = {
promise1: Promise.resolve("First promise result"),
promise2: new Promise( (resolve, reject) => { /*...*/ } ),
};
return <PromisesComponent
promises={ multiplePromises }>
{(data) => <ul>
<li>First promise result: {JSON.stringify(data.promise1)}}</li>
<li>Second promise result: {JSON.stringify(data.promise2)}}</li>
</ul> }
</PromiseComponent>;
render() method of component. Promise shall be created in componentDidMount() method of component. Another way is to use memoize function in render() method:import memoizeOne from "memoize-one";
import { PromiseComponent } from "@vlsergey/react-promise";
class MyComponent extends PureComponent {
constructor() {
super(...arguments);
this.promiseFactory = memoizeOne( (arg1, arg2) => new Promise( /*...*/ ) );
}
render() {
const { arg1, arg2 } = this.props;
const promise = this.promiseFactory( arg1, arg2 );
return <PromiseComponent promise={promise}>/*...*/</PromiseComponent>;
}
}
Unspecified minor versions are for dependencies updates.
autobind-decorator with arrow function per @bradzacher advise in typescript-eslint/typescript-eslint#3245.null and undefined as result of Promise (and let user decide what to do with it).Promise or shallow-same promises object in PromisesComponent)FAQs
React wrappers for Promises
We found that @vlsergey/react-promise 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.