在ApolloConsumer的上下文中找不到客户端

时间:2020-08-31 12:33:41

标签: reactjs apollo react-apollo apollo-client

我正在使用apollo客户端,但是使用 withApollo HOC

访问子组件中的 ApolloClient 实例时出现错误

错误消息:

在ApolloConsumer的上下文中找不到“客户端”。将根组件包装在

根组件: enter image description here

子组件: enter image description here

0 个答案:

没有答案