Replies: 2 comments 2 replies
-
|
If you don't need the native-specific functionality (crashlytics, perf, messaging, etc) then the JS libs will of course be easier and I'd recommend them. Most people do need some of the native functionality in a full-featured app though As to RTDB listeners not firing I'm just not sure, haven't seen any issues logged. These things can get messy that is for sure, there are many more layers involved when you add in the native code We are working to support Expo more as a first-class citizen though, and at least for now I've got a build solution that "just works" as far as I can see, and demonstrates the necessary linking shenanigans required with react-native's new prebuilds + expo https://github.com/mikehardy/rnfbdemo/blob/main/make-expo-demo.sh Unfortunately, with all the extra native layers and each one being the subject of continuous optimization by both firebase for their libs and react-native for theirs, and cocoapods moving to SPM etc - there is just some irreducible complexity |
Beta Was this translation helpful? Give feedback.
-
|
Hi Mike, thank you for the quick reply and the solution and thank you for all the work you put into this amazing package. I don't want to move away, as I am using all the native parts like crashlytics, messaging and perf. I will definitely try your build solution. Maybe as a suggestion: You could put a small section on the offical rnf website linking to that file? Sth like "if you have troubles making it work with expo, try this". Because I was looking for sth like that but could not find it on my own and I am sure that other people must have similar issues. Thank you and have a great day. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I don't really know where to put this other than here, if its inappropriate please tell:
I think I will move away from react native firebase and just use firebase js instead. The pain of dependency upgrades does not justify the benefits of the package.
I have been using react native firebase for ~4 years now and I am generally quite happy with it. Happy aside from dependency upgrades. I am using react native since like 7/8 years now, last year I was unable to do a dep upgrade with bare workflow for my project within 2 months (!). That is why I decided to switch to expo, since they now have continuous native generation (omg yes) and don't require expo go anymore. I am generally quite happy with it, I now have a single file that defines the build settings for my app across ios and android native parts.
So last year when I switched to expo and had everything set up it all worked except for react native firebase. For some reason all writes to my realtime db with .update({something: null}) failed (expo 52.x.y and rnf 21.z.p). I then spent a week or so finding the cause and the right patches in order to make it work.
Now I tried to upgrade to expo 54 and rnf 23. I had a ton of build errors, but luckily the AI is good enough to fix most of these issues by now. It e.g. fixed the config plugin errors of #8829 without me having to look at gh issues. And now all onValue listeners of my realtime db don't work anymore. They just don't return anything, no error, nothing. I had a quick look on gh issues, did not find anything. I could probably now spend 1 to 2 weeks finding a combination of expo and rnf versions that miraculously work together, but I think I wont.
I am a solo developer and I don't have the luxury of spending ~20% of my available working time each year on dependency upgrades. I recently did more web app development and I almost cried when I did a dep upgrade and it just succeeded in like one hour after fixing all typescript errors. Also with dynamic link deprecation one of the major benefits of rnf over firebase js is gone.
So, do you also have these problems? Am I doing sth wrong? Is it bc I am using rtdb instead of firestore? I would expect that expo + rnf is a very common combination, its like 100% standard stuff, nothing fancy. In my experience so far I would say they are not compatible.
Thank you! I appreciate any feedback.
Beta Was this translation helpful? Give feedback.
All reactions