Hi i get this error when in my browser when i run my code:
TypeError: Object(...) is not a function ./src/index.js src/index.js:31
28 | firebaseStateName
This is where your problem is:
reactReduxFirebase(firebase, config),
reduxFirestore(firebase)
There has been a little change in the configuration in the latest version, which you must use if you're using react V6.
*Make sure you install the latest version by typing:
npm i --save react-redux-firebase@next
http://docs.react-redux-firebase.com/history/v3.0.0/docs/v3-migration-guide.html
+ import { ReactReduxFirebaseProvider } from 'react-redux-firebase'
+ import { createFirestoreInstance } from 'redux-firestore'
- import { reactReduxFirebase } from 'react-redux-firebase' // removed
- import { reduxFirestore } from 'redux-firestore' // removed
const store = createStore(
rootReducer,
initialState,
compose(
- reactReduxFirebase(firebase, rrfConfig), // removed
- reduxFirestore(firebase)
// applyMiddleware(...middleware) // removed
)
)
+ const rrfProps = {
+ firebase,
+ config: rrfConfig,
+ dispatch: store.dispatch,
+ createFirestoreInstance // <- needed if using firestore
+ }
const App = () => (
+
+
);