rangle / redux-beacon

Analytics integration for Redux and ngrx/store
https://rangle.gitbook.io/redux-beacon/
MIT License
668 stars 71 forks source link

Any Event [*] is invoked for all events even though the exact key match present #349

Open schavaLogi opened 4 years ago

schavaLogi commented 4 years ago

This is a...

Note: for support questions, please use stackoverflow with the redux-beacon tag. This repository's issues are reserved for feature requests and bug reports.

Which version of Redux Beacon are you using?

Which target(s) are you using?

(If this is a bug report, feel free to delete the :scroll: and :rocket: sections. Likewise, if this is a documentation or feature request, feel free to delete the :beetle: sections)

:beetle: What are the steps to reproduce your issue?

  1. Register Exact matched Action type with event handler
  2. Register * event handler (any)

:beetle: What did you expect to happen?

Expect to Invoke only the exact matched event handler as it is present instead of both matched and any handler. any handler need to be invoked if there are no exact match

:beetle: What happened instead?

Invoked both exact matches and * any handler and processed both events to custom target

Can you help out?

Itrulia commented 4 years ago

This doesn't seem like a bug but the intended behaviour:

  1. https://rangle.gitbook.io/redux-beacon/index-1/events-map
  2. https://github.com/rangle/redux-beacon/blob/master/packages/redux-beacon/src/get-events-with-matching-key.ts#L12