Я изучаю интеграцию firestore с реагировать на родную и получаю эту очень странную ошибку. В этом коде хранилище с усилителями создается в другом файле, а затем используется этим хранилищем в основном файле App.js. Буду признателен за любую помощь.
Ошибка, возникающая на телефоне
store.js
import { createStore, compose } from 'redux'
import { reactReduxFirebase,getFirebase } from 'react-redux-firebase'
import { reduxFirestore,getFirestore } from 'redux-firestore'
import ReduxThunk from 'redux-thunk';
import { initialState, rootReducer } from '../Reducers/index.js'
import fbConfig from './fbConfig'
import firebase from 'firebase/app'
import 'firebase/firestore'
if (!firebase.apps.length) {
firebase.initializeApp(fbConfig)
}
const enhancers = [
reduxFirestore(firebase),
reactReduxFirebase(firebase, {
userProfile: 'Movies',
useFirestoreForProfile: true,
})
]
const reduxDevToolsExtension = window.devToolsExtension
if (
process.env.NODE_ENV === "development" &&
typeof reduxDevToolsExtension === "function"
) {
enhancers.push(reduxDevToolsExtension())
}
const composedEnhancers = compose(
...enhancers,
applyMiddleware(thunk.withExtraArgument({getFirebase,getFirestore}))
)
const store = createStore(rootReducer, initialState, composedEnhancers)
export default store
App.js
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import {View,Platform,StatusBar} from 'react-native';
import { createStore, applyMiddleware } from 'redux';
import ReduxThunk from 'redux-thunk';
import reducers from './src/Reducers';
import SafeAreaView from 'react-native-safe-area-view';
import RootNav from './src/Navigator';
import store from './src/config/store.js'
import TheatreList from './src/Components/TheatreList';
class App extends Component {
render() {
return (
<View style={{flex:1}}>
<Provider store={store}>
<RootNav />
</Provider>
</View>
);
}
}
export default App;