Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/387.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript TypeError(中间值)不是构造函数_Javascript_Reactjs_React Native - Fatal编程技术网

Javascript TypeError(中间值)不是构造函数

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-

我正在尝试将我的react原生应用程序作为graphql客户端,我曾经使用redux,现在正在添加graphql。我遇到了一个错误,图片显示了这一点

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()
?谢谢!我只是愚蠢,我还没看到错误