Sign up for Hasura Newsletter
Loading...

变更后积极的用户界面更新

我们可以看到当用户创建待办事项时存在着一个延迟。我们还可以创建用户界面,其中用户界面以积极的方式更新,假设变更将取得成功。

为了实现在已完成状态之间的切换,以及删除待办事项,让我们当我们运行变更时,使用积极的更新!

我们将学习以下概念:

  • 创建 GraphQL 变更
  • 使用 useMutationReact Hook
  • 集成积极的用户界面更新
  • 捕获加载/已完成/错误状态

让我们开始吧!

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin