Я пытаюсь подключить firebase, но получаю такую ошибку:
TypeError: Object (...) не является функцией
Мой магазин. js
import { compose, createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { reactReduxFirebase, getFirebase } from 'react-redux-firebase';
import { reduxFirestore, getFirestore } from 'redux-firestore';
// Importing components
import rootReducer from './reducers/rootReducer';
import firebase from '../fbconfig/fbConfig';
const rrfConfig = {
userProfile: 'users',
useFirestoreForProfile: true
};
const composeEnhancers =
process.env.NODE_ENV === 'development'
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
: compose;
const store = createStore(
rootReducer,
composeEnhancers(
reactReduxFirebase(firebase, rrfConfig),
reduxFirestore(firebase),
applyMiddleware(thunk.withExtraArgument({ getFirebase, getFirestore }))
)
);
export default store;
Мой firebase conf
import firebase from 'firebase/app';
import 'firebase/firestore';
import 'firebase/auth';
import 'firebase/storage';
const config = {
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: ""
};
firebase.initializeApp(config);
firebase.firestore();
export default firebase;
Просто пытаюсь подключить firebase к redux Как решить эту проблему?