redux-saga-firebase | A redux saga integration for firebase | Authentication library
kandi X-RAY | redux-saga-firebase Summary
kandi X-RAY | redux-saga-firebase Summary
A redux saga integration for firebase.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- PURE_IMPORTS_START _Subject PURE_IMPORTS_END
- Get a token refresh channel for this subscription .
- Starts the login action .
- Get the URL for a given function name .
- Toggle the firestorestore .
- Uploads a file to a file .
- Upload a string to the specified file .
- Create a todo action .
- Updates a todos action .
- Send message .
redux-saga-firebase Key Features
redux-saga-firebase Examples and Code Snippets
Community Discussions
Trending Discussions on redux-saga-firebase
QUESTION
I'm unable to define a collection reference using redux-saga-firebase. I'm trying to define it like this:
...ANSWER
Answered 2020-Jun-15 at 15:57The problem with your code is that you are mixing the official firestore SDK libraries with the redux-saga-firestore ones. If you want to get a collectionReference
you have to do it using the official SDK, since the redux-saga-firestore libraries do not offer a method that returns that output.
So, in order to get the collectionReference
you would need to import the Firestore SDK and use almost the same code you already have on the getPlayersFromDb
function, and it would look like this:
QUESTION
I've read all of the questions below, and cannot find anything in the docs to describe how to sync a collection and receive only changed documents from a collection. I've got over 500 documents in my synced collection (using redux-saga-firebase syncCollection) but usually only about 100 of them ever change. At any given time, even fewer will change, but I'm currently getting all 500+ documents back when even one changes, which results in 500+ reads. Not ideal, and will cost me at scale.
Here is my code using redux-saga-firebase, but a vanilla firebase code answer would also suffice. How can get a synchronized response that sends only the changed documents in the collection?
...ANSWER
Answered 2020-Jun-10 at 23:26Firestore queries don't have a notion of querying "only things that have changed". You will need to create that notion on your own. The usual way to do this is by recording a timestamp in each document with the time it was last updated, then using that field in a range filter to get only documents updated since the latest update was received. You will need to track that latest update timestamp in the client. One possibility is to use the greatest timestamp seen in any document to date.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install redux-saga-firebase
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page