Skip to content

fix(examples): update react-native example to use v3 API #783

Open
@ChristopherJohnson25

Description

@ChristopherJohnson25

Hi, I'm using the React Native example from the repo https://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete/react-native-firebase and am currently getting this issue.

I'm on

"react-redux-firebase": "^3.0.3"
"react-native-firebase": "~5.5.6",

createStore.js code here:

import { compose, createStore } from 'redux';
import RNFirebase from 'react-native-firebase';
import { reactReduxFirebase } from 'react-redux-firebase';
import makeRootReducer from './reducers';

const reactNativeFirebaseConfig = {
 debug: true
};

const reduxFirebaseConfig = {
 userProfile: 'users', // save users profiles to 'users' collection
};

export default (initialState = { firebase: {} }) => {
 // initialize firebase
 const firebase = RNFirebase.initializeApp(reactNativeFirebaseConfig);

 const store = createStore(
   makeRootReducer(),
   initialState,
   compose(
    reactReduxFirebase(firebase, reduxFirebaseConfig), // pass initialized react-native-firebase app instance
    // applyMiddleware can be placed here
   )
 );

 return store;
};

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions