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

Add timeout prop to stop loading indefinitely

Open vstlouis opened this issue 7 years ago • 0 comments

  • react-firestore version: @latest
  • node version: 10.1.0
  • npm (or yarn) version: @latest

Great work with the library 👍 . Currently using with react-native-firebase. Not sure if my issue is related only to mobile but, I am not able to perform a .where in conjunction with a .order and have the collections listen to real time updates.. No problem, I've decided to just do my sorting in my components..

It would be nice to add in a sort prop to clean up this logic that gets applied after receiving a collection so I don't have to do this as well.

The biggest issue with this is currently there is no way to stop showing the loading after some timeout. If there is not data in a collection this loads indefinitely.. which isn't the best UX. We should be able to provide a timeout to stop showing the loading after a certain amount of time (while still having it listen to updates come in). I have a solution that works just fine, but it would be nice to just have this here in this module.

I'd be willing to create a PR for this if you think both or one of these suggestions would be beneficial.

Let me know!

vstlouis avatar Jul 09 '18 18:07 vstlouis