redux-firestore
redux-firestore copied to clipboard
bug(query): not attaching multiple listeners with same config other than storeAs
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
}
}
This should fix it? https://github.com/prescottprue/redux-firestore/pull/144
#182 might fix this issue