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 using ReactReduxFirebaseProvider #24

Open
Shubhon9 opened this issue Oct 2, 2019 · 0 comments
Open

error using ReactReduxFirebaseProvider #24

Shubhon9 opened this issue Oct 2, 2019 · 0 comments

Comments

@Shubhon9
Copy link

Shubhon9 commented Oct 2, 2019

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import {createStore,applyMiddleware,compose} from 'redux'
import rootReducer from './store/reducers/rootReducer';
import {Provider} from 'react-redux'
import thunk from 'redux-thunk'
import {createFirestoreInstance,getFirestore} from 'redux-firestore'
import {getFirebase} from 'react-redux-firebase'
import fsConfig from './config/fsConfig'
import firebase from 'firebase/app'
import ReactReduxFirebaseProvider from 'react-redux-firebase'

const store= createStore(rootReducer,compose(
applyMiddleware(thunk.withExtraArgument({getFirebase,getFirestore})),
//reduxFirestore(fsConfig),
//reactReduxFirebase(fsConfig)
)
);

const rrfProps = {
    firebase,
    config: fsConfig,
    dispatch: store.dispatch,
    createFirestoreInstance
  };

ReactDOM.render(

<ReactReduxFirebaseProvider {...rrfProps}>


, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();

i got version error so used code for version-3 for firebase and made a few change using ReactReduxFirebaseProvider and create firestore instance but now i am getting an error stating
"Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. at the <Context.Provider> component:" occuring at ReactReduxFirebaseProvider

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

1 participant