redux-beacon icon indicating copy to clipboard operation
redux-beacon copied to clipboard

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

Open schavaLogi opened this issue 5 years ago • 1 comments

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?

  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?

  • [ ] :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.

schavaLogi avatar Feb 11 '20 06:02 schavaLogi

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

Itrulia avatar Oct 01 '20 08:10 Itrulia