redux-beacon
redux-beacon copied to clipboard
Any Event [*] is invoked for all events even though the exact key match present
This is a...
- [ X] :beetle: Bug Report
- [ ] :rocket: Feature Request
- [ ] :scroll: Documentation Request
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?
- v 2.1.0
Which target(s) are you using?
- [ ] Google Analytics
- [ ] Google Analytics (gtag)
- [ ] React Native Google Analytics
- [ ] Google Tag Manager
- [ ] React Native Google Tag Manager
- [ ] Amplitude
- [ ] Segment
- [ ] React Native Segment
- [ X] Other/Third Party: ...(please specify here)
(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?
- Register Exact matched Action type with event handler
- 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?
- [ ] :star2: I am a legend and can get started on a pull request right away given the go-ahead.
- [ X] :star: I am a superstar and would like to help out given some guidance.
- [ ] :disappointed: I won't be able to help out on this one.
This doesn't seem like a bug but the intended behaviour:
- https://rangle.gitbook.io/redux-beacon/index-1/events-map
- https://github.com/rangle/redux-beacon/blob/master/packages/redux-beacon/src/get-events-with-matching-key.ts#L12