![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Wait for one or more async functions to be done.
npm install --save ondone
var ondone = require('ondone');
tasks = ondone(tasks, doneFn);
ondone
accepts an array of tasks
and a done function (doneFn
). It returns an array of functions that can be passed to any async execution engine (like miniq
or async.js
). It adds the following functionality:
In short, this is "waiting for tasks to complete" portion of async execution without the actual task execution logic. It helps keep async runners smaller (ondone is ~1000 bytes unminified) while allowing them to support more flexible task batching.
Tasks are callbacks that have a signature such as:
function(done) {}
function(arg1, done) {}
function(arg1, arg2, ..., done)
that is, the last argument to each task must be a done
function. The done
function should accept an err
(error) parameter as it's first argument, and may have additional arguments after the err
argument, e.g.:
function done(err) {}
function done(err, arg) {}
function done(err, arg1, arg2, ...) {}
Here, I'm taking a set of tasks and dividing it into two sets of tasks. When each set of tasks completes, the done function for that set is called:
var completedFirst = false,
completedSecond = false;
async.waterfall(
ondone([
function(callback){ callback(null, 'one', 'two'); },
function(arg1, arg2, callback){ callback(null, arg1 + arg2 + 'three');}
], function() { completedFirst = true; })
.concat(
ondone([
function(arg1, callback){ callback(null, arg1 + 'done'); }
], function() { completedSecond = true; }))
, function (err, result) {
assert.equal(result, 'onetwothreedone');
assert.ok(completedFirst);
assert.ok(completedSecond);
});
FAQs
Wait for one or more async functions to be done.
We found that ondone 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.