![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.
await-to-go
Advanced tools
Async await wrapper for easy error handling like Golang
Special thanks to https://github.com/scopsy/await-to-js for the inspiration, actually I forked this project and make some small changes.
You need to use Node 7.6 (or later) or an ES7 transpiler in order to use async/await functionality. You can use babel or typescript for that.
npm i await-to-go --save
import go from 'await-to-go';
// If you use CommonJS (i.e NodeJS environment), it should be:
// const go = require('await-to-go').default;
async function asyncTaskWithCb(cb) {
let err, user, savedTask, notification;
// data and error are returned
[user, err] = await go(UserModel.findById(1));
// handling error here, not data itself
if (err) return cb('No user found');
[savedTask, err] = await go(TaskModel({userId: user.id, name: 'Demo Task'}));
if (err) return cb('Error occurred while saving task');
if(user.notificationsEnabled) {
[, err] = await go(NotificationService.sendNotification(user.id, 'Task Created'));
if (err) return cb('Error while sending notification');
}
if(savedTask.assignedUser.id !== user.id) {
[notification, err] = await go(NotificationService.sendNotification(savedTask.assignedUser.id, 'Task was created for you'));
if (err) return cb('Error while sending notification');
}
cb(null, savedTask);
}
async function asyncFunctionWithThrow() {
const [user, err] = await go(UserModel.findById(1));
if (err) throw new Error(err);
}
interface ServerResponse {
test: number;
}
const p = Promise.resolve({test: 123});
const [data, err] = await go<ServerResponse>(p);
console.log(data.test);
MIT
FAQs
Async/await wrapper for easy error handling in js
The npm package await-to-go receives a total of 2 weekly downloads. As such, await-to-go popularity was classified as not popular.
We found that await-to-go 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.