crobinson42 / event-sky Goto Github PK
View Code? Open in Web Editor NEWAn event store & utility for javascript apps.
License: MIT License
An event store & utility for javascript apps.
License: MIT License
Publish a React HOC/decorator that extends event-sky and use in React apps.
Use case
const eventMap = {
'event1': this.event1Handler,
'event2': this.event2Handler,
}
const ventIdList = vent.register(eventMap)
console.log(ventIdList) // [eventId1, eventId2]
vent.off(eventMap)
// or
ventIdList.forEach(vent.off)
// or
vent.off.all(ventIdList)
this would be useful in a React component or other lib where a class unmounts and we want to reference this
to remove all events tied to the context.
vent.off(context);
Instead of only being able to use the default firehose
logging, provide a way to extend event-store to use a custom function similar to a redux middleware function.
.on('*'...)
.on('audiobook.*.error'...)
currently we pass an event name or an eventId to remove a listener, it would be nice to have the same functionality as other event type frameworks like jquery, etc. by passing in the function/callback to be removed
test
Test body... created through rest api
Publish a utility to be used as redux middleware
The example I was showing Collin Kokotas, .before was alerting in odd order and undefined.. need to replicate in browser
This is useful in places like a redux store action creator where you trigger an action but don't want the trigger event to happen until after the reducer has gone through it's callstack, so, we give a convenience method that puts the .trigger() on the next cpu tick.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.