Javascript TypeError(中间值)不是构造函数
我正在尝试将我的react原生应用程序作为graphql客户端,我曾经使用redux,现在正在添加graphql。我遇到了一个错误,图片显示了这一点Javascript TypeError(中间值)不是构造函数,javascript,reactjs,react-native,Javascript,Reactjs,React Native,我正在尝试将我的react原生应用程序作为graphql客户端,我曾经使用redux,现在正在添加graphql。我遇到了一个错误,图片显示了这一点 import { createStore, applyMiddleware, combineReducers } from 'redux'; import { persistReducer } from 'redux-persist'; import AsyncStorage from '@react-native-community/async-
import { createStore, applyMiddleware, combineReducers } from 'redux';
import { persistReducer } from 'redux-persist';
import AsyncStorage from '@react-native-community/async-storage';
import thunk from 'redux-thunk';
import { ApolloClient } from 'apollo-client';
import { apolloReducer } from 'apollo-cache-redux';
import { InMemoryCache } from 'apollo-cache-inmemory';
import ReduxLink from 'apollo-link-redux';
import { onError } from 'apollo-link-error';
import { createHttpLink } from 'apollo-link-http';
import { accountReducer } from './account.reducer';
import { ApolloLink } from 'apollo-link';
const persistConfiguration = { key: 'spottd', storage: AsyncStorage };
const rootReducer = combineReducers({ accountReducer, apolloReducer });
const persistedReducer = persistReducer(persistConfiguration, rootReducer);
const store = createStore(persistedReducer, {}, applyMiddleware(thunk));
const cache = new new InMemoryCache();
const reduxLink = new ReduxLink(store);
const httpLink = createHttpLink({ uri: `https://dcef73ba.ngrok.io/graphql` });
const errorLink = onError((errors) => { console.log(errors); });
const link = ApolloLink.from([ reduxLink, errorLink, httpLink, ]);
const client = new ApolloClient({ link, cache });
export default store;
export { link, client }
新建InMemoryCache()
?谢谢!我只是愚蠢,我还没看到错误