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

error in composing firebasestore and firebase with middelware. #30

Open
pralhad88 opened this issue Jan 18, 2020 · 4 comments
Open

error in composing firebasestore and firebase with middelware. #30

pralhad88 opened this issue Jan 18, 2020 · 4 comments

Comments

@pralhad88
Copy link

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

@pralhad88
Copy link
Author

please give me some solution so I can move forward to watch next tutorial thank you.

@avirupdutta
Copy link

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

@AhmedMalekX
Copy link

@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.

@SaadEla
Copy link

SaadEla commented Feb 10, 2020

@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

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