0

I got error

Error: Context from react-redux not found. If you are using react-redux v6 a v3.. version of react-redux-firebase is required.

I try steps in reference documentation, I did upgrade react-redux-firebase to version 3.0.0-alpha.6, but it did not work, I try downgrade react-redux to 4.4.9 but the same problem is still exist;

My JSON file

{
    "name": "clientpanel",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
        "firebase": "^5.8.1",
        "react": "^16.7.0",
        "react-dom": "^16.7.0",
        "react-redux": "6.0.0",
        "react-redux-firebase": "2.2.6",
        "react-router-dom": "^4.3.1",
        "react-scripts": "2.1.3",
        "redux": "^4.0.1",
        "redux-firestore": "^0.6.3"
    },
    "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
    },
    "eslintConfig": {
        "extends": "react-app"
    },
    "browserslist": [
        ">0.2%",
        "not dead",
        "not ie <= 11",
        "not op_mini all"
    ]
}

How to fix error?

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Aldemaro14
  • 23
  • 1
  • 7

2 Answers2

0

Download v3 as following:

npm i --save react-redux-firebase@latest

Then you can refactor your code to work with v3 as written here in the docs: https://github.com/prescottprue/react-redux-firebase/tree/next

2- Or just use react-redux v5.1.1

npm i --save react-redux@^5.0.0
Nidhin Kumar
  • 3,278
  • 9
  • 40
  • 72
0

I run into the same error and some TypeErrors just like you.

I think if you are using latest versions of react-redux-firebase and redux-firestore the changed the way of using their provider so you might want to use the ReactReduxFirebaseProvider imported from react-redux-firebase and wrap your App component inside it, instead of using the reactReduxFirebase in your createStore function.

you might wanna take a look at this solution:

https://stackoverflow.com/a/62537595/10763842

AWIXOR
  • 406
  • 4
  • 15