Skip to content
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

Using RNFirebase for a React Web App #1530

Closed
babara2 opened this issue Sep 25, 2018 · 5 comments
Closed

Using RNFirebase for a React Web App #1530

babara2 opened this issue Sep 25, 2018 · 5 comments
Assignees

Comments

@babara2
Copy link

babara2 commented Sep 25, 2018

Hi,

I was wondering if it is at all possible to use RNFirebase for a ReactJS webapp. I really like how the notifications module is implemented and would like to use the functionality for my web app.

@Salakar
Copy link
Member

Salakar commented Sep 26, 2018

@babara2 for the Web you'll have to use the official Firebase Web SDK, we use the native Android & iOS SDK's on this library. Notifications is very much specific to Android or iOS devices.

Web SDK: https://firebase.google.com/docs/web/setup


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

@Salakar Salakar closed this as completed Sep 26, 2018
@Salakar Salakar self-assigned this Sep 26, 2018
@gsouf
Copy link

gsouf commented Oct 9, 2019

@Salakar what's about today with React Native for Web ?

@Ehesp
Copy link
Member

Ehesp commented Oct 10, 2019

@gsouf no change. This library targets Android & iOS so using the Firebase official Web SDK is the way to go.

@invertase invertase locked as resolved and limited conversation to collaborators Oct 10, 2019
@invertase invertase unlocked this conversation Oct 10, 2019
@gsouf
Copy link

gsouf commented Oct 10, 2019

To the question:

what's the recommended way to work with invertase for an application that compiles to ios/android and web?

Invertase's team answered:

Your best bet is to create a file which returns an instance of Firebase depending on the environment. Our SDK matches the Web SDK where it can, however there are differences, so the experience may be tricky.

@mikehardy
Copy link
Collaborator

Or have an interface that abstracts your firebase services, and in your bootstrap switch based on platform which firebase implementation is used to implement the interface, a classic example being something like pluggable database drivers in native apps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants