-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firestore]: infinite render #207
Comments
I tried to track this down, but couldn't quite figure it out. However, this info from dev tools may hopefully be helpful in tracking down why the hooks are continuously firing. Note that hook 23 is a callback that uses the collections returned by the other two CollectionData hooks. So that hook call is due to the upstream hook calls. Also, as OP notes, this was reproducible using the local emulator, so hopefully that is also helpful in tracking down the root cause. |
Holy hell dude because of this broken package now you have to pay $100...that's so tough 😭😭😭 I had the same issue and then just migrated my project away from r-f-h and switched to the necessary functions in Firebase v9 modular. If anyone's looking, this is a temporary solution until this package is fixed. |
I can only apologise that this has happened, in attempting to fix another bug I overlooked the way that This behaviour is only happening when the |
$100 wasn’t too bad overall for this particular project, and I was relieved to find out why it happened! Thanks for fixing, root cause makes sense, will test it tonight! |
Google is usually pretty good about refunding stuff like this if you just ask. I would recommend citing this issue if you do ask. |
checked version 5.0.2 on my project - I did not find any problems. thanks for the quick fix |
I also found this to be fixed, thanks again!
Great suggestion, I reached out. I'll be good either way though - I have caused much more expensive bugs in my life 🤣 |
Also, @chrisbianca I love this library. On a previous project (a while back) I had to write a similar internal lib, so I have appreciated the huge amount of time this has saved on my current project :-) |
Oof—yup, I was on version 5.0.1 and got a few hundred thousand reads on a project before noticing. @chrisbianca thank you for the quick fix and this library! |
@SpainTrain @christiangenco you're very welcome, I'm glad its useful and justified the time I've spent on it! Sorry again for the slip up here! |
Thank you for fixing this bug, and thank god I was on free plan so it didnt cost me penny. |
In version 5, there is an infinite rendering of the component, which uses the hooks of this package. In 10 seconds, the hook manages to make ~ 1500 requests to the firestore. To check - I started a clean project, but the problem is still there.
App.jsx
package.json
Version 4 didn't have this problem. I noticed this behavior when my project made 89k requests in 15 minutes
At the same time, I did not change anything in the source code, I only updated the "react-firebase-hooks" package. After that I created a clean project for testing, but the problem still remained
The text was updated successfully, but these errors were encountered: