error in composing firebasestore and firebase with middelware.
Opened this issue · 4 comments
const store = createStore(rootReducer,
compose(
applyMiddleware(thunk.withExtraArgument({getFirebase, getFirestore})),
reactReduxFirebase(fbConfig), // redux binding for firebase
reduxFirestore(fbConfig) // redux bindings for firestore
)
);
in this line error is throwing it says TypeError: Object(...) is not a function
and say webpack_require in webpack/bootstrap:785
line
please give me some solution so I can move forward to watch next tutorial thank you.
i also faced the same problem... The problem lies in this line:-
reactReduxFirebase(fbConfig), // redux binding for firebase
looks like they've made a breaking change. Remove that line and everything should work out fine.
Final snippet you should have:-
const store = createStore(rootReducer, compose( applyMiddleware(thunk.withExtraArgument({getFirebase, getFirestore})), reduxFirestore(fbConfig) // redux bindings for firestore ) );
For detailed explanation check these out:-
https://stackoverflow.com/questions/55559816/typeerror-object-is-not-a-function-on-index-js
http://docs.react-redux-firebase.com/history/v3.0.0/docs/v3-migration-guide.html
@pralhad88 to solve this problem update "react-redux-firebase" property on your package.json file with this version "2.1.6" and the problem will solved.
@pralhad88 it's a react-redux-firebase version problem in the tuto we are working with version 2 and there is some update's fro v2 to v3. For me i installed the version 2 and completed the tuto
u can do it by executing in the terminal : npm i --save react-redux-firebase^@2.5.0