TypeError: Object (...) не является функцией. Я принимал его ошибку. response-Redux-Firebase 2.2.4 version Мне сказали, чтобы я уронил, но сделал, но браузер error.web выдал новую ошибку:
TypeError: Невозможно прочитать свойство 'SDK_VERSION' из undefined. Как вы думаете, какое решение? ? Вы мне помогаете?
пакет. json
{
"name": "marioplan",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"firebase": "^7.8.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-redux": "^7.1.3",
"react-redux-firebase": "^2.2.4",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.0",
"redux": "^4.0.5",
"redux-firestore": "^0.12.0",
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint-plugin-react": "^7.18.3"
}
}
index. js
/* eslint-disable no-unused-vars */
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import {createStore, applyMiddleware,compose} from 'redux';
import rootReducer from './store/rootReducer';
import {Provider} from 'react-redux'
import thunk from 'redux-thunk'
import {getFirestore,reduxFirestore } from 'redux-firestore'
import {getFirebase,reactReduxFirebase} from 'react-redux-firebase'
import fbConfig from './config/fbConfig'
const store=createStore(rootReducer,
compose(
applyMiddleware(thunk.withExtraArgument({getFirebase,getFirestore})),
reduxFirestore(),
reactReduxFirebase()
)
);
ReactDOM.render(<Provider store ={store}></Provider>><App />, document.getElementById('root'));