-
Hello, I'm trying to implement this feature where I fetch some data on page load, and then after a button is clicked to trigger a refetch of this same query, and the request completes, I render a success or error notification in the UI. My idea was to set some state when the "refetch" button was clicked, and then check for it in the What's the recommended approach for doing something like this? Simple example: Codesandbox |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
you can either |
Beta Was this translation helpful? Give feedback.
you can either
await
the refetch and then show the notification, or you use the global callbacks: