Container- container / ReviewPage.js
import ReviewPage from '../components/ReviewPage.jsx'
const Container = compose(
graphql(ALL_TABLE_CELLS_BY_PAGE_ID,{
name: 'tableCellsforPage',
options: ownProps => ({
fetchPolicy: 'network-only',
variables: { pageId: ??? }
}),
props: ({ data }) => {
tableCells = data.allTableCellsByTableId.nodes
}
})
)(ReviewPage)
export default Container
Component- components / ReviewPage.jsx
handleCheckMarkClick(page){
const cells = this.props.tableCellsforPage(page.id)
}
我要解雇this.props.tableCellsforPage(page.id)
鉴于我正在传递page.id,如何读取variables: { pageId: ??? }