![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.
NOTE: The version >= 1.0.0 had remove the file,
dist
.
An events system for JavaScript. It can do with async or sync event dispatching.
Using npm:
npm install xy-events
const { Events } = require('xy-events');
const instance = new Events();
function logger(event) {
consol.log(event.message)
}
instance.addEventListener('message', logger);
instance.dispatchEvent({ type: 'message', message: 'This is an example' });
instance.removeEventListener('message', logger);
// Or you can use like this
function logger2(message, message2) {
console.log(message + message2);
}
instance.addEventListener('message', logger2);
instance.dispatchEvent('message', 'Hello!', 'This is an other example!');
instance.removeEventListener('message', logger2);
const { Events } = require('xy-events');
function Cat() {
Events.call(this);
}
const prototype = Object.create(Events.prototype);
Cat.prototype = prototype;
Cat.prototype.constructor = Cat;
Cat.prototype.hunger = function() {
console.log('I am hunger!');
this.dispatchEvent({ type: 'hunger' });
}
function feed() {
console.log('Give the cat a fish');
}
const cat = new Cat();
cat.addEventListener('hunger', feed);
cat.hunger();
const { Events } = require('xy-events');
const events = new Events();
function test1() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test1');
resolve()
}, 200);
})
}
function test2() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test2');
resolve()
}, 100);
})
}
function test3() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test3');
resolve()
}, 10);
})
}
function test4() {
console.log('test4');
}
events.addEventListener('test', test1);
events.addEventListener('test', test2, { mode: 'async' });
events.addEventListener('test', test3, { mode: 'async' });
events.addEventListener('test', test4);
events.dispatchEvent('test');
// -> test2, test3, test4, test1
const { Events } = require('xy-events');
const events = new Events();
function test1() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test1');
resolve()
}, 200);
})
}
function test2() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test2');
resolve()
}, 100);
})
}
function test3() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test3');
resolve()
}, 10);
})
}
function test4() {
console.log('test4');
}
events.addEventListener('test', test1);
events.addEventListener('test', test2);
events.addEventListener('test', test3);
events.addEventListener('test', test4);
events.syncDispatchEvent('test');
// -> test4, test3, test2, test1
const { Events } = require('xy-events');
const events = new Events();
function test1() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test1');
resolve()
}, 200);
})
}
function test2() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test2');
resolve()
}, 100);
})
}
function test3() {
return new Promise((resolve) => {
setTimeout(() => {
console.log('test3');
resolve()
}, 10);
})
}
function test4() {
console.log('test4');
}
events.addEventListener('test', test1);
events.addEventListener('test', test2);
events.addEventListener('test', test3);
events.addEventListener('test', test4);
events.asyncDispatchEvent('test');
// -> test1, test2, test3, test4
FAQs
An events system for JavaScript
The npm package xy-events receives a total of 4 weekly downloads. As such, xy-events popularity was classified as not popular.
We found that xy-events 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.