-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emit payload overwritten #153
Labels
Comments
How about something like: instance.on("foo", (type, data) => {
console.log(type, data);
});
instance.emit("foo", {bar: 3}); // note: data doesn't have to be an object |
Looks good! |
Awesome! I'll definitely add this once I'm done rewriting the virtual DOM engine. This change should actually reduce the size a little, but is breaking and will come in v1. |
In this way, type could be an optional param: instance.on("foo", (data, type) => {
console.log(data, type);
}); |
Looking good! I think I should actually remove the instance.on("foo", (data) => {
// data can be anything
});
instance.on("*", (type, data) => {
// access to both the type of event and the data passed
}); |
Great idea! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, @kbrsh... when you emit something like:
I think that emit payload could be:
The text was updated successfully, but these errors were encountered: