Handy class for emitting UI Events
const MY_EVENT = createEvent();
MY_EVENT.on((data) => {console.log("hello there " + data.name)}); // Print 'hello there jeff' if Event gets triggered
MY_EVENT.trigger({name: "jeff"}); // Trigger Event
npm install @agile-ts/event
The event
package is an extension of AgileTs and doesn't work without the core
package,
which functions as the brain of AgileTs and is indispensable.
Unfortunately, we can't combine each core
with event
version.
Therefore, we have created a table which shows which versions fit together without restrictions.
@agile-ts/event | @agile-ts/core | NPM Version | Supported React versions | Supports hook based components |
---|---|---|---|---|
v0.0.1+ | v0.0.10+ | v6+ | 16.8+ | Yes |
Other Versions aren't supported anymore |
The Agile Event Docs are located here