【发布时间】:2018-05-15 10:26:52
【问题描述】:
在 apollo-client 更新后,我无法向父组件发送道具。 我要做的是
<Query query={GET_DOG_PHOTO} variables={{ breed }}>
{({ loading, error, data }) => {
if (loading) return null;
if (error) return `Error!: ${error}`;
return (
<img src={data.dog.displayImage} style={{ height: 100, width: 100 }} />
);
}}
查询完成后我需要发送一个函数
有什么想法吗?
【问题讨论】:
标签: reactjs graphql react-apollo apollo-client