This course is no longer maintained and may be out-of-date. While it remains available for reference, its content may not reflect the latest updates, best practices, or supported features.
变更后积极的用户界面更新
我们可以看到当用户创建待办事项时存在着一个延迟。我们还可以创建用户界面,其中用户界面以积极的方式更新,假设变更将取得成功。
为了实现在已完成状态之间的切换,以及删除待办事项,让我们当我们运行变更时,使用积极的更新!
我们将学习以下概念:
- 创建 GraphQL 变更
- 使用
useMutation
React Hook - 集成积极的用户界面更新
- 捕获加载/已完成/错误状态
让我们开始吧!
Did you find this page helpful?
Start with GraphQL on Hasura for Free
Build apps and APIs 10x faster
Built-in authorization and caching
8x more performant than hand-rolled APIs

