【发布时间】:2018-04-10 02:23:40
【问题描述】:
我有一个 react-apollo HoC 包装组件和从 github graphql api 获取的数据。
假设我们包装的组件道具将具有如下所示的数据:
我如何通过解构达到边缘??
我知道我可以像这样访问search 字段:
({ data: { search }} ) => <Component data={search.edges} />
但是这样的事情可能吗?
({ data: { search: { edges} }} ) => <Component data={edges} />
谢谢!
【问题讨论】:
标签: reactjs react-native apollo react-apollo apollo-client