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

bug(query): not attaching multiple listeners with same config other than storeAs

Open prescottprue opened this issue 7 years ago • 2 comments

Do you want to request a feature or report a bug?
Bug

What is the current behavior? When making two separate queries with the same configuration

What is the expected behavior? Using storeAs should cause the queries to be treated as seperate (i.e. attach both instead of skipping it)

Which versions of dependencies, and which browser are affected by this issue? Did this work in previous versions or setups?

Steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.

Currently this can be worked around by providing allowMultipleListeners: true to config:

{
  allowMultipleListeners: true
}

allowMultipleListeners also accepts a function:

{
  allowMultipleListeners: (listenerSettings, currentListeners) => {
    // return whether or not multiple listeners should be enabled in this case
    return !!listenerSettings.storeAs // allow multiple listeners for queries containing storeAs
  }
}

prescottprue avatar May 26 '18 00:05 prescottprue

This should fix it? https://github.com/prescottprue/redux-firestore/pull/144

compojoom avatar Oct 12 '18 05:10 compojoom

#182 might fix this issue

rscotten avatar Mar 01 '19 21:03 rscotten