-
0 votesanswersviews
不知道为什么我的cursorForObjectInConnection返回null?
我在回复时出现此错误: 对于不可为空的字段TodoEdge.cursor,不能返回null . 这是我的变异代码: mutateAndGetPayload: async ({text}, context) => { let newTodo = new TodoModel({ text, _creatorUserId: context.user._id }); aw... -
9 votesanswersviews
Relay Modern RefetchContainer道具不会传递给组件
我在Relay Modern中设置refetchContainer时遇到了一些问题 . 父组件是QueryRenderer,它运行初始查询,适当地填充子组件的道具(a-prop-riately?eh?eh?!) . refetchContainer指定我们所有的变量,并在输入字段的onChange事件上,使用新变量重新运行查询 . 这一切都很完美,除了孩子的道具永远不会更新收到的新数据 . 我可... -
1 votesanswersviews
可以使用Relay的RefetchContainer更新兄弟组件吗?
是否可以通过从兄弟组件调用 refetch 来更新组件的道具? 考虑具有以下结构的组件: <Home> # wrapped in a QueryRenderer <List /> # wrapped in a Fragment Container <Map /> # wrapped in a Refetch Container </Home...