Sign up for Hasura Newsletter
Loading...

Apollo useSubscription Reactフック

ライブデータをUIに取り込む最も簡単な方法は、Apollo React-HooksのuseSubscription Reactフックを使うことです。これにより、コンポーネントのレンダリング機能内のサービスから直接データのストリームをレンダリングできます。subscriptionは単なるlistenerであるため、最初に接続したときはデータを要求せず、新しいデータ取得のためだけに接続を開くという点に注意してください。

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