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

How do integrate redux-sage-firebase with react-native-firebase #190

Open
zzbynzz opened this issue May 7, 2019 · 3 comments
Open

How do integrate redux-sage-firebase with react-native-firebase #190

zzbynzz opened this issue May 7, 2019 · 3 comments

Comments

@zzbynzz
Copy link

zzbynzz commented May 7, 2019

I integrated using code:
`import firebase from 'react-native-firebase';
import ReduxSagaFirebase from 'redux-saga-firebase';

const reduxSagaFirebase = new ReduxSagaFirebase(firebase.app);

export default reduxSagaFirebase;`
But still receive error (I need use Firestore) :
Screen Shot 2019-05-07 at 16 14 11

@zzbynzz
Copy link
Author

zzbynzz commented May 7, 2019

I installed package : @firebase/firestore , but it still notify error :
error: bundling failed: Error: Unable to resolve module @firebase/appfrom/Users/quan_tb/workspaces/pharmedia/mobile/node_modules/@firebase/firestore/dist/index.cjs.js: Module @firebase/app does not exist in the Haste module map
Seems @firebase/firestore can't work with react-native-firebase, as it says :
This package is not intended for direct usage, and should only be used via the officially supported firebase package.

@quantb95
Copy link

No one care :'(

@Matgsan
Copy link

Matgsan commented May 22, 2020

@zzbynzz Have you solved? I am having the same issue.

@david-potgieter
Copy link

david-potgieter commented Jun 24, 2020

Should anyone else stumble accross the same issue:

The documentation is not very clear (on react-native-firebase) but you should import the firebase tool you intend to use for the saga. As example:

import firebase from '@react-native-firebase/app';
import ReduxSagaFirebase from 'redux-saga-firebase';
import '@react-native-firebase/auth'; // <--- import it here 
import '@react-native-firebase/firestore'; // <--- import it here 

const firebaseApp = firebase.apps[0];
const rsf = new ReduxSagaFirebase(firebaseApp);

export default rsf;

This was the clue: https://rnfirebase.io/app/usage#switching-app-instance

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

4 participants