cvara / rxdb-hooks

React hooks for integrating with RxDB
MIT License
136 stars 6 forks source link

New functionality: collection.count #60

Open DevinFrenze opened 1 year ago

DevinFrenze commented 1 year ago

I would love to see support for collection.count queries in rxdb-hooks. Do you think this would best work as a useRxCount hook or as part of the useRxData hook?

If you could offer your feedback and approve of a direction then I would be happy to try to implement this. I don't assume that the maintainers have time to implement every feature request.

cvara commented 1 year ago

Hi @DevinFrenze. Thanks for bringing this up.

colleciton.count() has been added from rxdb version 13.8, so before adding support for it somehow, I would like to ensure compatibility between rxdb-hooks and rxdb 13. At the moment the only issue I can detect is #61 which I would say is a blocker. Once #61 is resolved, I would probably go about introducing a dedicated useRxCount hook to avoid overloading useRxData.

If you are still interested in giving it a go, I can ping you again once #61 is out of the way.