Update README.MD
This commit is contained in:
@@ -123,7 +123,7 @@ To invalidate queries, please see the following example of using `utils` which c
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
// navbar.tsx
|
// navbar.tsx
|
||||||
const queryRes = trpc.example.hello.useQuery(name()); // ✅
|
const queryRes = trpc.example.hello.useQuery(name()); // ✅ this will refetch on invalidation in footer.tsx
|
||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
return <div>{queryRes.data}</div>;
|
return <div>{queryRes.data}</div>;
|
||||||
|
|||||||
Reference in New Issue
Block a user