React native 客户端错误出现后的Client.middleware
请帮我找出并修复它!!此错误发生在安装新项目react native并在代码下方创建appolo客户端之后React native 客户端错误出现后的Client.middleware,react-native,React Native,请帮我找出并修复它!!此错误发生在安装新项目react native并在代码下方创建appolo客户端之后 Error: [Wed Sep 02 2020 09:04:35.796] ERROR TypeError: client.middleware is not a function. (In 'client.middleware()', 'client.middleware' is undefined) [Wed Sep 02 2020 09:04:35.798] ERROR
Error:
[Wed Sep 02 2020 09:04:35.796] ERROR TypeError: client.middleware is not a function. (In 'client.middleware()', 'client.middleware' is undefined)
[Wed Sep 02 2020 09:04:35.798] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
[Wed Sep 02 2020 09:04:35.804] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
注意:屏幕没有崩溃,没有显示,只有白色屏幕,应用程序构建成功
export const client = new ApolloClient({
uri: 'http://localhost:3000/graphql',
});
const middlewares = [client.middleware(), thunk];
export const store = createStore(
reducers(client),
undefined,
composeWithDevTools(applyMiddleware(...middlewares)),
);