I am creating a react app that should connect to Firebase and query Firestore. I am using react-redux-firebase and redux-firestore to connect to the Firebase API. I however get an error indicating that an Object... is not a function. please assist. Below is my code
I import the two like so
import { reduxFirestore, getFirestore } from 'redux-firestore';
import { reactReduxFirebase, getFirebase } from 'react-redux-firebase';
then I import my Firebase config file like so:
import fbConfig from './config/fbConfig';
My store then follows:
const store = createStore(rootReducer,
compose(
applyMiddleware(thunk.withExtraArgument({ getFirebase, getFirestore })),
reduxFirestore(fbConfig),
reactReduxFirebase(fbConfig)
)
);
The affected line is this
applyMiddleware(thunk.withExtraArgument({ getFirebase, getFirestore })),
It says Type error Object is not a Method.
Please assist. Thanks