Skip to content

Commit

Permalink
Fix invalidateQueries
Browse files Browse the repository at this point in the history
  • Loading branch information
briandoyle81CB committed Jun 28, 2024
1 parent e0e607d commit eaa2095
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/base-docs/tutorials/docs/1_event-gate-nouns.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ You also need a `useEffect` to refetch the data from the blockchain when `scanne
```tsx
useEffect(() => {
queryClient.invalidateQueries({ queryKey: balanceQueryKey });
if (scannedAddress) {
queryClient.invalidateQueries({ queryKey: balanceQueryKey });
}
}, [scannedAddress]);
```
Expand Down

0 comments on commit eaa2095

Please sign in to comment.