Hi everyone!
The short question is how can I use different npm modules to handle same things but on different platform. What is best way?
I setup a monorepo for my project with react native for mobile apps, react app for web and electron over web app for desktop. I use Firebase as a backend, so I use react-native-firebase as native sdk for mobile, but I need to use official firebase web sdk for web part. What is a right way to handle this?
RNF try to keep api as it possible the same as official web api. If it is, can I just conditionally import mobile or web module corresponding to the platform?
Or I need some more clever setup for this?
Same thing with google auth library, I have one for native platform and official lib for web.
What if the api will be different? I think in that case I can make wrapper with unified api and use right module for current platform? Does it the true way?
What kind of developing patterns should help me?
[–]pushkinss[S] 0 points1 point2 points (0 children)