@agile-ts/event

Handy class for emitting UI updates and passing data with them

Usage no npm install needed!

<script type="module">
  import agileTsEvent from 'https://cdn.skypack.dev/@agile-ts/event';
</script>

README

[WIP] Event

Handy class for emitting UI Events

Status npm version GitHub License npm monthly downloads npm total downloads npm minified size

⏰ Short Example

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

⬇️ Installation

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

📄 Documentation

The Agile Event Docs are located here